Automatically remove unnecessary `# pylint-disable` comments.
Project description
pylint-reenable
A tool (and pre-commit hook) to automatically remove unnecessary # pylint: disable
comments, for example: a check that's no longer applicable (say you increased your
max line length), a mistake (# pylint: disable
added to a line that wasn't failing),
or other code in the file caused it to no longer need a # pylint: disable
(such as an unused import).
NOTE: this is lifted from yesqa, whose license is included here (as per its terms).
Installation
pip install pylint-reenable
Command-line example
$ pylint-reenable my_file.py
As a pre-commit hook
See pre-commit for instructions
Sample .pre-commit-config.yaml
:
- repo: https://github.com/MarcoGorelli/pylint-reenable
rev: v0.1.3
hooks:
- id: pylint-reenable
If you need to select a specific version of pylint and/or run with specific
pylint plugins, add them to additional_dependencies
.
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_reenable-0.1.3.tar.gz
.
File metadata
- Download URL: pylint_reenable-0.1.3.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3379ab77587ebbba78bc0efeb5abdaa32823ccff1570a7ed34d80a613ae7667 |
|
MD5 | c58e546ade08f98d6b5f8af3d8c2f88a |
|
BLAKE2b-256 | 7794d7cf548e13aed9109b2558a32e5c97b13e1a795b65f0bda58a805780f36d |
Provenance
File details
Details for the file pylint_reenable-0.1.3-py2.py3-none-any.whl
.
File metadata
- Download URL: pylint_reenable-0.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c29054d6f8c7d703a7156114048ac368a45c2187f69ca60f30e9a744acef2ae0 |
|
MD5 | fcbc9f174ea6bcd50d8ecf1109959e68 |
|
BLAKE2b-256 | 060c66c0c17bcd6f735b7e99822dcacd07348a1b7bd8b7fd579d7fa52dbefb57 |