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

"python.linting.pylintArgs": ["--load-plugins", "pylint_pydantic"]

Tests

pylint --rcfile=pylintrc --load-plugins pylint_pydantic examples/base_model.py
------------------------------------
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.2.0: support Pydantic V2

  • v0.2.1: support model_validator

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.2.1-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for pylint_pydantic-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6142fc4aada13a83328484ca3aef384e43f8cfcc128f8cd84bc38d64191a08ee
MD5 9ed45ccec1281491728eef4d48b81bff
BLAKE2b-256 5c7de6dbaf1b4e3c8c5dd0a3f7efcae7554876ffbcaf3a424b681341a310b42e

See more details on using hashes here.

Provenance

Supported by

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