This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Prototype a means to detect non-strict types in Pydantic models at lint time #13336
Labels
T-Task
Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Z-Dev-Wishlist
Makes developers' lives better, but doesn't have direct user impact
Milestone
I don't like not-strict-by-default either. FWIW there is the intention to have that feature At Some Point (pydantic/pydantic#1098).
For enforcement, we could write a linter which parses the AST and complains if a type inheriting from
BaseModel
has an annotation which involves one of the non-strict types, or involves a constrained type withoutstrict=True
. I don't like the idea of writing something home-grown for that, butOriginally posted by @DMRobertson in #13188 (comment)
The text was updated successfully, but these errors were encountered: