flake8-pydantic

A flake8 plugin to check Pydantic related code.

MIT License

Downloads
3.6K
Stars
13
flake8-pydantic - Release 0.3.1 Latest Release

Published by Viicos 6 months ago

What's Changed

  • Improve Pydantic model detection robustness (#11)
  • Fix crash in the visitor implementation (#10)

Full Changelog: https://github.com/Viicos/flake8-pydantic/compare/0.3.0...0.3.1

flake8-pydantic - Release 0.3.0

Published by Viicos 8 months ago

0.3.0 (2024-03-14)

Add a new rule:

  • PYD006 - Duplicate field name

Will raise an error with the following:

class Model(BaseModel):
    x: int
    x: int = 1
flake8-pydantic - Releas 0.2.0

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

flake8-pydantic - Release 0.1.0.post0

Published by Viicos 8 months ago

What's Changed

Full Changelog: https://github.com/Viicos/flake8-pydantic/compare/0.1.0...0.1.0.post0

flake8-pydantic - Releas 0.1.0

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__