tefra / xsdata-pydantic

Naive XML & JSON Bindings for python pydantic classes!
https://xsdata-pydantic.readthedocs.io/
MIT License
52 stars 10 forks source link

Specify Any as the return type for field() #32

Open puc9 opened 4 days ago

puc9 commented 4 days ago

📒 Description

Since field() function has no return type annotation the type checkers will infer that it is FieldInfo 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

A place to write any comments to the reviewer.

🛫 Checklist