Registry / testing / pylint-pydantic

pylint-pydantic

JSON →
library0.4.1pypypi✓ verified 25d ago

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-pydantic
INSTALL
IMPORT
SIG · PYLINT-PYDANTIC
P
pylint-pydantic
testingpythonv0.4.1
Install
4.4s avg
Import
Disk
36MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 36.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.4s · import 0.000s · 36MB
36MB installed
● package 36MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pylint_pydantic
pylint --load-plugins pylint_pydantic your_module.py
import pylint_pydantic
This is a Pylint plugin and is enabled via Pylint configuration (e.g., command line, .pylintrc, or pyproject.toml), not by a direct Python import statement in your code.

Define a Pydantic model, then run `pylint` with the `--load-plugins pylint_pydantic` argument to apply the plugin's checks to your file.

from pydantic import BaseModel, Field class User(BaseModel): name: str = Field(min_length=1) age: int # Save this as 'my_models.py' # Then run pylint from your terminal: # pylint --load-plugins pylint_pydantic my_models.py
Debug
Known issues
breakingPylint-pydantic v0.4.0 dropped support for Python 3.9. Users on Python 3.9 must use an older version of the plugin or upgrade their Python interpreter.
fix
Upgrade Python to 3.10 or newer, or pin `pylint-pydantic<0.4.0`.
affects: >=0.4.0
breakingCompatibility with Pylint major versions has changed. Pylint-pydantic v0.3.0 introduced support for Pylint 3, and v0.4.0 introduced support for Pylint 4. Ensure your `pylint-pydantic` version matches your `pylint` major version.
fix
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.
affects: <0.3.0 (for Pylint 3), <0.4.0 (for Pylint 4)
gotchaWhen using Pydantic V2, ensure you are using `pylint-pydantic` v0.2.0 or newer. Older versions may not correctly interpret Pydantic V2 features, leading to false positives or missed warnings.
fix
Upgrade `pylint-pydantic` to v0.2.0 or later: `pip install --upgrade pylint-pydantic`.
affects: <0.2.0 (with Pydantic V2)
gotchaPylint may emit `no-name-in-module` or `no-member` warnings for Pydantic `BaseModel` attributes if the plugin is not correctly loaded or if an older Pylint version is used without proper configuration.
fix
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.
affects: All versions (if misconfigured)
Upgrade
Version history
0.4.1latest on PyPI · released Oct 27, 2025
Audit
Dependencies
pylintrequiredThis is a plugin for Pylint and requires Pylint to function.
pydanticrequiredThis plugin extends Pylint's capabilities specifically for Pydantic models.
pylint-plugin-utilsrequiredA utility library often used for developing Pylint plugins.
Agent activity
16 hits · last 30 days
node
12
Amazon
1
OpenAI (training)
1
Resources
pylint-pydantic — pip install pylint-pydantic · libregistry