Open puc9 opened 4 days ago
Since field() function has no return type annotation the type checkers will infer that it is FieldInfo and show errors in the generated classes.
field()
FieldInfo
Pydantic solves this by annotating the return type as Any.
Annotate the return type for the field function.
field
A place to write any comments to the reviewer.
📒 Description
Since
field()
function has no return type annotation the type checkers will infer that it isFieldInfo
and show errors in the generated classes.Pydantic solves this by annotating the return type as Any.
🔗 What I've Done
Annotate the return type for the
field
function.💬 Comments
🛫 Checklist