diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/flake8/defaults.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/flake8/defaults.py b/src/flake8/defaults.py index ec68067..22304a9 100644 --- a/src/flake8/defaults.py +++ b/src/flake8/defaults.py @@ -28,12 +28,15 @@ NOQA_INLINE_REGEXP = re.compile( # ``# noqa`` # ``# noqa: E123`` # ``# noqa: E123,W451,F921`` + # ``# noqa:E123,W451,F921`` # ``# NoQA: E123,W451,F921`` # ``# NOQA: E123,W451,F921`` + # ``# NOQA: E123,W451,F921`` # We do not want to capture the ``: `` that follows ``noqa`` # We do not care about the casing of ``noqa`` # We want a comma-separated list of errors - r"# noqa(?:: (?P<codes>([A-Z][0-9]+(?:[,\s]+)?)+))?", + # https://regex101.com/r/4XUuax/2 full explenation of the regex + r"# noqa(?::[\s]?(?P<codes>([A-Z][0-9]+(?:[,\s]+)?)+))?", re.IGNORECASE, ) |
