diff --git a/src/flake8/defaults.py b/src/flake8/defaults.py index ec68067..1b5d091 100644 --- a/src/flake8/defaults.py +++ b/src/flake8/defaults.py @@ -28,12 +28,14 @@ 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([A-Z][0-9]+(?:[,\s]+)?)+))?", + r"# noqa(?::[\s]?(?P([A-Z][0-9]+(?:[,\s]+)?)+))?", re.IGNORECASE, )