Metadata-Version: 2.4
Name: pylint-per-file-ignores
Version: 4.0.0
Summary: A pylint plugin to ignore error codes per file.
Author-email: Christopher Pickering <christopher@going.bg>, Kai Harder <kai.harder@sap.com>
Maintainer-email: Kai Harder <kai.harder@sap.com>
License-Expression: MIT
Project-URL: Changelog, https://github.com/SAP/pylint-per-file-ignores/blob/main/CHANGELOG.md
Project-URL: Issue Tracker, https://github.com/SAP/pylint-per-file-ignores/issues
Keywords: pylint,plugin,quality,linter
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Typing :: Typed
Requires-Python: <4,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pylint<5,>=4.0
Dynamic: license-file

[![REUSE status](https://api.reuse.software/badge/github.com/SAP/pylint-per-file-ignores)](https://api.reuse.software/info/github.com/SAP/pylint-per-file-ignores)
[![Coverage Status](https://coveralls.io/repos/github/SAP/pylint-per-file-ignores/badge.svg)](https://coveralls.io/github/SAP/pylint-per-file-ignores)

# Pylint Per File Ignores
This pylint plugin will enable per-file-ignores in your project!

The project was initially created by [christopherpickering](https://github.com/christopherpickering).

## Install
```
pip install pylint-per-file-ignores
```

## Add to Pylint Settings

**.pylintrc**
```ini
[MAIN]
load-plugins =
    pylint_per_file_ignores
```

**setup.cfg**
```ini
[pylint.MASTER]
load-plugins =
    pylint_per_file_ignores
```

**pyproject.toml**
```toml
[tool.pylint.main]
load-plugins = [
    "pylint_per_file_ignores",
]
```

## Usage
Add a list of patterns and codes you would like to ignore following `<file-pattern>:<code1>,<code2>`.
The patterns are matched using [globs](https://docs.python.org/3/library/glob.html).
Newlines between codes are supported.

> Prior to v2.0.0, `pylint-per-file-ignores` did not use globs but regex.
> When migrating, please check your configuration carefully.

Please note, that if two patterns applies the same files, the last configuration will be used.

**.pylintrc**
```ini
[MESSAGES CONTROL]
per-file-ignores =
  /folder_1/*:missing-function-docstring,W0621,W0240,C0115
  file.py:C0116,E0001
```

**setup.cfg**
```ini
[pylint.MESSAGES CONTROL]
per-file-ignores =
  /folder_1/*:missing-function-docstring,W0621,W0240,C0115
  file.py:C0116,E0001
```

**pyproject.toml**
```toml
[tool.pylint.'messages control']
per-file-ignores = [
    "/folder_1/*:missing-function-docstring,W0621,W0240,C0115",
    "file.py:C0116,E0001"
]
```

Please note, that for non-toml files newlines are important.
For example, the following won't parse as expected

```ini
[pylint.MESSAGES CONTROL]
per-file-ignores =
  /folder_1/*:missing-function-docstring,
    missing-class-docstring
```

## Development
This project uses [`uv`](https://docs.astral.sh/uv/).
To install uv, and setup a venv for development, use:
```
python3.14 -m venv venv && \
    source venv/bin/activate && \
    pip install uv && uv sync --all-groups && \
    deactivate  && \
    rm -rf venv/
```
This will create a temporary `venv`, install uv to bootstrap the project
`.venv`, and remove the temporary `venv` again.
Then use `source .venv/bin/activate` to activate your venv.

## Build and Publish
Execute the release action with the proper version.

## Support, Feedback, Contributing

This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/SAP/pylint-per-file-ignores/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).

## Security / Disclosure
If you find any bug that may be a security problem, please follow our instructions at [in our security policy](https://github.com/SAP/pylint-per-file-ignores/security/policy) on how to report it. Please do not create GitHub issues for security-related doubts or problems.

## Code of Conduct

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its [Code of Conduct](https://github.com/SAP/.github/blob/main/CODE_OF_CONDUCT.md) at all times.

## Licensing

Copyright 2026 SAP SE or an SAP affiliate company and pylint-per-file-ignores contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/SAP/pylint-per-file-ignores).
