Public API
pre-commit hook to augment Flake8 noqa comments with PyLint comments.
Functions:
find_noqa (physical_line)
|
Search a string for # noqa: ... comments. |
find_pylint_disable (physical_line)
|
Search a string for # pylint: disable=... comments. |
process_file (filename)
|
Augment Flake8 noqa comments with PyLint comments in the given file. |
-
find_noqa
(physical_line)[source]
Search a string for # noqa: ...
comments.
- Parameters
physical_line (str
)
- Return type
Optional
[Match
[str
]]
-
find_pylint_disable
(physical_line)[source]
Search a string for # pylint: disable=...
comments.
- Parameters
physical_line (str
)
- Return type
Optional
[Match
[str
]]
-
process_file
(filename)[source]
Augment Flake8 noqa comments with PyLint comments in the given file.
- Parameters
filename (Union
[str
, Path
, PathLike
])
- Return type
bool
- Returns
True
if the file contents were changed. False
otherwise.