A pylint plugin to ignore error codes per file.
Project description
Pylint Per File Ignores 😲
This pylint plugin will enable per-file-ignores in your project!
Install
# w/ poetry
poetry add --dev pylint-per-file-ignores
# w/ pip
pip install pylint-per-file-ignores
Add to Pylint Settings
[tool.pylint.MASTER]
load-plugins=[
"pylint_per_file_ignores",
...
]
Usage
Add list of patterns and codes you would like to ignore.
Using native pylint settings
Section "MESSAGES CONTROL". Examples:
# setup.cfg
[pylint.MESSAGES CONTROL]
per-file-ignores =
/folder_1/:missing-function-docstring,W0621,W0240,C0115
file.py:C0116,E0001
# pyproject.toml
[tool.pylint.'MESSAGES CONTROL']
per-file-ignores = [
"/folder_1/:missing-function-docstring,W0621,W0240,C0115",
"file.py:C0116,E0001"
]
Using custom pyproject.toml
section
For backwards compatibility only. Example:
[tool.pylint-per-file-ignores]
"/folder_1/"="missing-function-docstring,W0621,W0240,C0115"
"file.py"="C0116,E0001"
Thanks
To pylint :) And the plugin pylint-django
who produced most of the complex code.
Contributing
This repo uses commitizen and semantic release. Please commit using npm run commit
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pylint_per_file_ignores-1.3.2.tar.gz
.
File metadata
- Download URL: pylint_per_file_ignores-1.3.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.0 Linux/6.2.0-1011-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c641f69c316770749a8a353556504dae7469541cdaef38e195fe2228841451e |
|
MD5 | b318cdb19edffe8850555d98a02a99c1 |
|
BLAKE2b-256 | c74d44bc55d37c4d8abe96b1a3b57baecc0a1534264ec85b946bbcf35fa21618 |
File details
Details for the file pylint_per_file_ignores-1.3.2-py3-none-any.whl
.
File metadata
- Download URL: pylint_per_file_ignores-1.3.2-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.0 Linux/6.2.0-1011-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a2a2d7b88484ef1d1b1170029e542954f70efbab13ac3b977606ea5617d04c1 |
|
MD5 | f38577824f782fdf75421dee35b5965c |
|
BLAKE2b-256 | ff8961ca7d4fa42a235dbe1fd72a025c019e7a2e380cef31219073c933e3d5ee |