Pylint-pydantic is a Pylint plugin designed to enhance Pylint's understanding of Pydantic models, reducing false positives and improving static analysis for Pydantic-heavy codebases. The current version is 0.4.1, and it maintains an active release cadence, frequently updating to support new major versions of Pylint and Pydantic, as well as addressing bug fixes.
pip install pylint-pydanticVerified import paths — ran on the pinned version, not inferred.
Define a Pydantic model, then run `pylint` with the `--load-plugins pylint_pydantic` argument to apply the plugin's checks to your file.
Upgrade Python to 3.10 or newer, or pin `pylint-pydantic<0.4.0`.
For Pylint 3, use `pylint-pydantic>=0.3.0,<0.4.0`. For Pylint 4, use `pylint-pydantic>=0.4.0`. Review the changelog for specific compatibility.
Upgrade `pylint-pydantic` to v0.2.0 or later: `pip install --upgrade pylint-pydantic`.
Ensure `pylint --load-plugins pylint_pydantic` is used. For older Pylint versions, you might also need to add `--extension-pkg-whitelist='pydantic'` to your Pylint arguments.