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 |
|
---|---|
Tests |
|
PyPI |
|
Activity |
|
QA |
|
Other |
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:
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.
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.1.tar.gz
(6.1 kB
view hashes)
Built Distribution
flake2lint-0.4.1-py3-none-any.whl
(17.5 kB
view hashes)
Close
Hashes for flake2lint-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da3bca188339b2b0fb65679722f6168a1afec8b456131d9dfea0a861e6f1c077 |
|
MD5 | b56c63bdbf917e277f05932d1b8c1bbc |
|
BLAKE2b-256 | 32c3fdb2905ace32e98b283b0e69a491980b3d7215d880d30968a6936331526e |