mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 02:46:52 +00:00
This PR addresses issue #549 (noqa does only work as intended with single letter error codes). A single change in the regex NOQA_INLINE_REGEXP in defaults.py will allow to catch error codes which consist of more than one letter.
This will close #549.
This commit is contained in:
parent
2f8bc64b1e
commit
0ac337608b
1 changed files with 1 additions and 1 deletions
|
|
@ -36,7 +36,7 @@ NOQA_INLINE_REGEXP = re.compile(
|
|||
# We do not care about the casing of ``noqa``
|
||||
# We want a comma-separated list of errors
|
||||
# https://regex101.com/r/4XUuax/2 full explenation of the regex
|
||||
r"# noqa(?::[\s]?(?P<codes>([A-Z][0-9]+(?:[,\s]+)?)+))?",
|
||||
r"# noqa(?::[\s]?(?P<codes>([A-Z]+[0-9]+(?:[,\s]+)?)+))?",
|
||||
re.IGNORECASE,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue