Skip to main content

Pylint Patcher

Build Status Python Package Index (PyPI)

Pylint addon to store lint exceptions in a patchfile.

Overview

Pylint can be a bit noisy with false positives. By default, these can be ignored by:

  • Disabling warnings inline (littering your code with “# pylint: disable=” pragmas)

  • Disabling warnings globally (causing real problems to be missed)

  • Accepting a low Pylint score

Pylint Patcher provides another solution:

  1. Individual lint exceptions are stored in a patchfile (.pylint-disable.patch)

  2. The patchfile is applied to the source before Pylint is run

  3. The patchfile is removed from the source after Pylint completes

Installation

pip install pylint-patcher

Usage

Running Pylint Patcher

Pylint Patcher is run in exactly the same manner as Pylint. It accepts all the same arguments:

pylint-patcher path/to/package_or_module

This applies the patchfile (if it exists), runs Pylint, then removes the patchfile.

For more details, use the --help option.

Creating a Patchfile

The easiest way to create and maintain a patchfile is to use the pylint-patcher-gui tool:

pylint-patcher-gui

This runs a modified version of pylint-gui, allowing Pylint warnings to be added to the patchfile:

  1. Open a module or package, and click Run.

  2. Once the lint completes, double-click the warnings in the bottom pane to show them in the source pane.

  3. If a warning is invalid, right-click it and select Add to ignore patchfile.

  4. Once you’re finished, click Run again, and confirm that the warnings have been disabled.

Development

All development takes place at the Pylint Patcher GitHub site. Further information about Pylint can be found at the Pylint Bitbucket site.

Metadata

Release files for pylint-patcher 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylint-patcher 0.3.2
File Size Uploaded
pylint-patcher-0.3.2.tar.gz 11.7 kB Details

Release files / pylint-patcher-0.3.2.tar.gz

Download URL pylint-patcher-0.3.2.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
abd47a1a6075f25b02bc44a478ff6b560fd9b10951fefa643ea46de98852269f
BLAKE2b-256 checksum
How to use checksums
03a2a80711b4bfb3624bc0a7ad9172eb0666f7939903f57ec8ada7e51172ca3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.2 This release

1 release file

0.3.1

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page