Skip to main content

Automatically remove unnecessary `# pylint-disable` comments.

Project description

Build Status Coverage pre-commit.ci status

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.4
    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

pylint_reenable-0.1.4.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylint_reenable-0.1.4-py2.py3-none-any.whl (5.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pylint_reenable-0.1.4.tar.gz.

File metadata

  • Download URL: pylint_reenable-0.1.4.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

Hashes for pylint_reenable-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6e339490dac788fcb81e48241c0298f728fbf936675a63bf15cf6b0364882765
MD5 c4f2700546063dcd1378ebed2a5f2dfb
BLAKE2b-256 73fb92a94501f9822e5e1d1cd1c586b888d5d686abe7667d0ccb22e29a3c06fb

See more details on using hashes here.

File details

Details for the file pylint_reenable-0.1.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pylint_reenable-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 80b2a1130a7b2f897fa183089339d8f4ebb146675a50516b22e39f30acb7aae6
MD5 f29fbde8362cd131528958d18bca646c
BLAKE2b-256 7033fb6d1d7f21f7ec61613f74529f9ba4b9c711249fbc0bf5d61853d3f49201

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page