diff options
| author | Tomer Keren <tomer.keren.dev@gmail.com> | 2018-12-27 18:18:52 +0200 |
|---|---|---|
| committer | Tomer Keren <tomer.keren.dev@gmail.com> | 2018-12-27 18:18:52 +0200 |
| commit | 08492ee857a16a1f6d3b942456de7010e3f0d03f (patch) | |
| tree | 45c97c6687d118f6d04350175eb0b1e3492918bd /src | |
| parent | 8c9c462154d3971d9f1ed6e6d38098845d8901a1 (diff) | |
| download | flake8-08492ee857a16a1f6d3b942456de7010e3f0d03f.tar.gz | |
Update regex to allow no space noqa
Diffstat (limited to 'src')
| -rw-r--r-- | src/flake8/defaults.py | 4 |
1 files changed, 3 insertions, 1 deletions
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<codes>([A-Z][0-9]+(?:[,\s]+)?)+))?", + r"# noqa(?::[\s]?(?P<codes>([A-Z][0-9]+(?:[,\s]+)?)+))?", re.IGNORECASE, ) |
