Answer prose round 1: 0 🔴, 14 🟡; keep each routing reason in one entry, retitle the stability reviewer's decision, and say what each help line and comment means
This commit is contained in:
@@ -58,7 +58,7 @@ def decoded_as(value: object, kind: typing.Any) -> typing.Any:
|
||||
if not isinstance(value, dict) or not required <= value.keys() <= shape.keys():
|
||||
return REJECTED
|
||||
fields = {name: decoded_as(field, shape[name]) for name, field in value.items()}
|
||||
# A dataclass that checks its fields, as Route does, names the check fits.
|
||||
# A dataclass that checks its fields, as Route does, does so in a static method named fits.
|
||||
if any(field in (REJECTED, RETIRED) for field in fields.values()) or not getattr(kind, "fits", lambda _: True)(fields):
|
||||
return REJECTED
|
||||
return kind(**fields)
|
||||
|
||||
Reference in New Issue
Block a user