A Pylint plugin to help Pylint understand the Pydantic
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"]
pylint --rcfile=pylintrc --load-plugins pylint_pydantic tests/
------------------------------------
Your code has been rated at 10.00/10
- How to resolve pylint: No name 'BaseModel' in module 'pydantic'?
- Add --extension-pkg-whitelist='pydantic' parameter (see #1961)
If you have any questions, please create a issue. https://github.com/fcfangcc/pylint-pydantic/issues
- 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