Skip to content

Commit

Permalink
Make _fields.py assertion much more helpful (#131)
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Wais <[email protected]>
Co-authored-by: Brent Yi <[email protected]>
  • Loading branch information
pwais and brentyi authored Apr 4, 2024
1 parent f70d6fc commit 42d6944
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tyro/_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ def _field_list_from_attrs(
elif isinstance(default, attr.Factory): # type: ignore
default = default.factory() # type: ignore

assert attr_field.type is not None
assert attr_field.type is not None, attr_field
field_list.append(
FieldDefinition.make(
name=name,
Expand Down

0 comments on commit 42d6944

Please sign in to comment.