skillfed

pylint-per-file-ignores

A pylint plugin to ignore error codes per file.

pylint-per-file-ignores v3.2.1 692.2K downloads/30d#5,322 on PyPI5
Permissive license MIT Active released

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-ignores

uv

uv add pylint-per-file-ignores

poetry

poetry add pylint-per-file-ignores

Installing 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

Development Status :: 5 - Production/StableEnvironment :: PluginsIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Quality AssuranceTyping :: Typed

Tags

pylint per-file ignorespylint selective error suppressionpylint glob-based rule ignorespylint file-specific linting rulespylint plugin configurationconditional pylint error codes
pylint-pluginlinting-configuration

More Quality Assurance packages