Tool and pre-commit hook to augment Flake8 noqa comments with PyLint comments.
Docs | |
---|---|
Tests | |
PyPI | |
Activity | |
QA | |
Other |
flake2lint
can be installed from PyPI.
To install with pip
:
$ python -m pip install flake2lint
flake2lint [-v] [-r] [FILENAMES]
Show verbose output.
Permits the use of the pattern **
to match any files, directories and subdirectories.
See the documentation for more details.
flake2lint
currently augments the following flake8 codes:
A001
➞redefined-builtin
A002
➞redefined-builtin
A003
➞redefined-builtin
Contributions to add support for more codes are more than welcome. The relevant code is here.
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
): ...