diff options
| author | Anthony Sottile <asottile@umich.edu> | 2018-12-27 16:54:47 +0000 |
|---|---|---|
| committer | Anthony Sottile <asottile@umich.edu> | 2018-12-27 16:54:47 +0000 |
| commit | d3d1b19aec60a0d728ca7ae1fef284015957f7a2 (patch) | |
| tree | 4c1788b6887bbe593e678705296d34a9505fdabb /src | |
| parent | c645a6761d406374921ce58c70774faa810320a3 (diff) | |
| parent | 445d19b9de7cd87138a4d4fb07e666720625c484 (diff) | |
| download | flake8-d3d1b19aec60a0d728ca7ae1fef284015957f7a2.tar.gz | |
Merge branch 'noqa_without_space_470' into 'master'
Accept Noqa without space
Closes #470
See merge request pycqa/flake8!273
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, ) |
