From 445d19b9de7cd87138a4d4fb07e666720625c484 Mon Sep 17 00:00:00 2001 From: Tomer Keren Date: Thu, 27 Dec 2018 18:28:08 +0200 Subject: [PATCH] Add link to regex101 for noqa regex This provides a step by step doc for the regular expression, and makes iterating on it much easier --- src/flake8/defaults.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/flake8/defaults.py b/src/flake8/defaults.py index 1b5d091..22304a9 100644 --- a/src/flake8/defaults.py +++ b/src/flake8/defaults.py @@ -35,6 +35,7 @@ NOQA_INLINE_REGEXP = re.compile( # 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 + # https://regex101.com/r/4XUuax/2 full explenation of the regex r"# noqa(?::[\s]?(?P([A-Z][0-9]+(?:[,\s]+)?)+))?", re.IGNORECASE, )