Skip to main content

A Pylint plugin to help Pylint understand the Pydantic

Project description

pylint-pydantic

A Pylint plugin to help Pylint understand the Pydantic

How to use

Installation

pip install pylint-pydantic

Use in console

pylint --load-plugins pylint_pydantic xxxxx

Use in vscode,settings.json add item

"pylint.args": ["--load-plugins", "pylint_pydantic"]
# in old vscode version maybe
"python.linting.pylintArgs": ["--load-plugins", "pylint_pydantic"]

Tests

pylint --rcfile=pylintrc --load-plugins pylint_pydantic tests/
------------------------------------
Your code has been rated at 10.00/10

FAQ

  • How to resolve pylint: No name ‘BaseModel’ in module ‘pydantic’?

    Add –extension-pkg-whitelist=’pydantic’ parameter (see #1961)

Other

If you have any questions, please create a issue. https://github.com/fcfangcc/pylint-pydantic/issues

Changelog

  • v0.3.4: fixed #35 #34

  • v0.3.1: fixed #29

  • v0.3.0: support pylint3

  • v0.2.4: fix pydantic.Field with BaseModel support

  • v0.2.2: fix model_validator keyword mode, pydatic>=2.0.3

  • v0.2.1: support model_validator

  • v0.2.0: support Pydantic V2

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pylint_pydantic-0.3.5-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file pylint_pydantic-0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for pylint_pydantic-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e7a54f09843b000676633ed02d5985a4a61c8da2560a3b0d46082d2ff171c4a1
MD5 2f6841e5df6bab2df6767349ebad55e1
BLAKE2b-256 13b657b898006cb358af02b6a5b84909630630e89b299e7f9fc2dc7b3f0b61ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page