A flake8 plugin to check Pydantic related code.
MIT License
Full Changelog: https://github.com/Viicos/flake8-pydantic/compare/0.3.0...0.3.1
Published by Viicos 8 months ago
Add a new rule:
PYD006
- Duplicate field name
Will raise an error with the following:
class Model(BaseModel):
x: int
x: int = 1
Published by Viicos 8 months ago
Add three new rules:
PYD003
- Unecessary Field call to specify a default value
PYD004
- Default argument specified in annotated
PYD005
- Field name overrides annotation
Drop support for Python 3.8
Published by Viicos 8 months ago
readme
metadata entry by @Viicos in https://github.com/Viicos/flake8-pydantic/pull/2
0.1.0.post0
by @Viicos in https://github.com/Viicos/flake8-pydantic/pull/3
Full Changelog: https://github.com/Viicos/flake8-pydantic/compare/0.1.0...0.1.0.post0
Published by Viicos 8 months ago
Initial release. The following rules are implemented:
PYD001
- Positional argument for Field default argument
PYD002
- Non-annotated attribute inside Pydantic model
PYD010
- Usage of __pydantic_config__