pylint-per-file-ignores
A pylint plugin to ignore error codes per file.
What it is and what it does
This is a pylint plugin that extends pylint's configuration system to support per-file and per-directory error suppression. Instead of applying ignore rules project-wide or using inline comments, you define patterns and error codes in your pylint config file (.pylintrc, setup.cfg, or pyproject.toml), and the plugin matches files using glob patterns to selectively disable specific checks. This is useful when you want stricter linting in some parts of your codebase but need to relax certain rules in others—for example, allowing missing docstrings in test files or generated code while enforcing them elsewhere.
The plugin is straightforward to integrate: load it in your pylint configuration, then add a `per-file-ignores` section listing glob patterns paired with comma-separated error codes. The plugin intercepts pylint's message filtering and applies your per-file rules automatically. It's actively maintained, supports modern Python versions (3.10–3.14), and carries no external dependencies beyond pylint itself.
Use it for:
- Relax docstring requirements in test files or example directories while enforcing them in production code.
- Suppress specific warnings in auto-generated or third-party code folders without modifying those files.
- Apply stricter linting rules to core modules while allowing more lenient checks in utilities or scripts.
- Gradually migrate a codebase to stricter pylint rules by exempting specific files or directories during transition.
- Configure different error thresholds for different project components (e.g., strict for libraries, relaxed for CLI tools).
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pylint plugin that lets you specify which error codes to ignore on a per-file or per-directory basis using glob patterns, rather than applying ignores project-wide.
Yes. If you use pylint and need fine-grained control over which files are subject to which rules, this plugin solves that cleanly without inline comments or project-wide compromises. Low install friction, active maintenance, no vulnerabilities, and MIT licensing make it a straightforward addition to any pylint setup.
Install
pylint-per-file-ignores on PyPI
pip
pip install pylint-per-file-ignoresuv
uv add pylint-per-file-ignorespoetry
poetry add pylint-per-file-ignoresInstalling pylint-per-file-ignores
Before you install
Low friction: pure Python wheel with only pylint as a runtime dependency. Actively maintained with a recent release (133 days ago) and current Python version support (3.10–3.14).
License in practice
MIT license is permissive; you can use, modify, and distribute this plugin freely with minimal restrictions.
Quickstart
pip install pylint-per-file-ignores
# Add to .pylintrc [MAIN] section:
# load-plugins = pylint_per_file_ignores
# Then in [MESSAGES CONTROL]:
# per-file-ignores =
# /folder_1/*:missing-function-docstring,W0621
# file.py:C0116,E0001
Requires pylint to be installed; glob patterns (not regex) are used for matching since v2.0.0.
Verify before relying
- Whether the plugin works with all current pylint versions or has known incompatibilities.
- Performance impact when applying per-file ignores to large codebases with many rules.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pylint |
| Maintenance | actively maintained — 133 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 692,175/month — #5,322 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pylint_per_file_ignores-3.2.1-py3-none-any.whl
Keywords: pylint, plugin, quality, linter
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
pylint-pytestA Pylint plugin that suppresses false-positive…
permissive · top 15,000 on PyPI
pytest-pylintIntegrates pylint code analysis into pytest,…
permissive · top 15,000 on PyPI
pylint-protobufA Pylint plugin that makes Pylint understand…
permissive · top 15,000 on PyPI
pylint-exitTranslates pylint's bit-encoded exit codes into…
permissive · top 15,000 on PyPI
pylint-quotesA Pylint plugin that enforces consistent use of…
permissive · top 15,000 on PyPI
pylint-pydanticA Pylint plugin that extends Pylint's…
copyleft · top 5,000 on PyPI
pytest-ignore-test-resultsA pytest plugin that selectively ignores test…
permissive · top 15,000 on PyPI
pylint-odooA Pylint plugin that adds Odoo-specific code…
agpl · top 15,000 on PyPI
pylint-djangoA Pylint plugin that improves static analysis…
copyleft · top 5,000 on PyPI
pylint-actionsA Pylint plugin that formats linting output as…
permissive · top 15,000 on PyPI