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

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

If you're not sure about the file name format, learn more about wheel file names.

pylint_pydantic-0.2.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for pylint_pydantic-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f44e38239c0da3cd1f500f7382ce57aaceb23200c2a675367d3e34b458b597a3
MD5 175583ae60e1af9f622896c86edd5373
BLAKE2b-256 0c9f94c61aefed46fbc23a9e45509d85df640cf158f5d7627ec67f5fce7c799e

See more details on using hashes here.

Supported by

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