Skip to main content

Tool and pre-commit hook to augment Flake8 noqa comments with PyLint comments.

Project description

Tool and pre-commit hook to augment Flake8 noqa comments with PyLint comments.

Docs

Documentation Build Status Docs Check Status

Tests

Linux Test Status Windows Test Status macOS Test Status Coverage

PyPI

PyPI - Package Version PyPI - Supported Python Versions PyPI - Supported Implementations PyPI - Wheel

Activity

GitHub last commit GitHub commits since tagged version Maintenance PyPI - Downloads

QA

CodeFactor Grade Flake8 Status mypy status

Other

License GitHub top language Requirements Status

Installation

flake2lint can be installed from PyPI.

To install with pip:

$ python -m pip install flake2lint

Usage

flake2lint [-v] [-r] [FILENAMES]

-v / --verbose

Show verbose output.

-r / --recursive

Permits the use of the pattern ** to match any files, directories and subdirectories.

See the documentation for more details.

Supported Flake8 Codes

flake2lint currently augments the following flake8 codes:

  • A001redefined-builtin

  • A002redefined-builtin

  • A003redefined-builtin

Contributions to add support for more codes are more than welcome. The relevant code is here.

Example

Before:

class FancyDialog(wx.Dialog):

        def __init__(
                        self,
                        parent,
                        id=wx.ID_ANY,  # noqa: A002
                        title="My Fancy Dialog",
                        pos=wx.DefaultPosition,
                        size=wx.DefaultSize,
                        style=wx.DEFAULT_DIALOG_STYLE,
                        name=wx.DialogNameStr,
                        data=None
                        ): ...

After:

class FancyDialog(wx.Dialog):

        def __init__(
                        self,
                        parent,
                        id=wx.ID_ANY,  # noqa: A002  # pylint: disable=redefined-builtin
                        title="My Fancy Dialog",
                        pos=wx.DefaultPosition,
                        size=wx.DefaultSize,
                        style=wx.DEFAULT_DIALOG_STYLE,
                        name=wx.DialogNameStr,
                        data=None
                        ): ...

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

flake2lint-0.4.3.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

flake2lint-0.4.3-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file flake2lint-0.4.3.tar.gz.

File metadata

  • Download URL: flake2lint-0.4.3.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for flake2lint-0.4.3.tar.gz
Algorithm Hash digest
SHA256 a09883486e713ce2f7688da3489d54a32f91d6de3ae201829d5df7a58dad70ae
MD5 ca2af648736dacb28365e05090cea14a
BLAKE2b-256 16065f62d3e0b13c42ea51eee1ccb3508182fc812d95085bb68cf48bb807859a

See more details on using hashes here.

File details

Details for the file flake2lint-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: flake2lint-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for flake2lint-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 271c46d464d1ad2906f89a10fa38b90c37788c5318082bb8d009c55ca705a0b3
MD5 4205a77edf675a97f22b60a727d4edf1
BLAKE2b-256 5c49b17b15c84460dd85bcc90f51657adfef71a4815a66bd3498c6edbbd5cd07

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