flake2lint

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


Keywords
flake8, pre-commit, pylint, python
License
MIT
Install
pip install flake2lint==0.4.2

Documentation

flake2lint

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
                        ): ...