mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 12:36:54 +00:00
Match noqa for users with explanations
This makes the regular expression a bit more complex, and potentially slower, but it will fix the issue where users had noqa comments with colons followed by explanations. Closes #178
This commit is contained in:
parent
47e3e65cc1
commit
c0ddc54f2f
4 changed files with 13 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ NOQA_INLINE_REGEXP = re.compile(
|
|||
# We do not care about the ``: `` that follows ``noqa``
|
||||
# We do not care about the casing of ``noqa``
|
||||
# We want a comma-separated list of errors
|
||||
'# noqa(?:: (?P<codes>[A-Z0-9,]+))?',
|
||||
'# noqa(?:: (?P<codes>([A-Z][0-9]+,?)+))?',
|
||||
re.IGNORECASE
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue