Skip to content

Commit

Permalink
This PR addresses issue #549 (noqa does only work as intended with si…
Browse files Browse the repository at this point in the history
…ngle 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.
  • Loading branch information
MarkusPiotrowski committed Jun 16, 2019
1 parent 2f8bc64 commit 0ac3376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flake8/defaults.py
Expand Up @@ -36,7 +36,7 @@
# 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,
)

Expand Down

0 comments on commit 0ac3376

Please sign in to comment.