diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2018-11-23 14:52:11 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2018-11-23 14:52:11 +0100 |
commit | 372bf0a7ab9f32ea92d0d15bb952f235f9a32567 (patch) | |
tree | 91e87b387edbf5e836977d71960962fb098c309c | |
parent | 912d66f9ba11a7c9c96d1e502ebdbf8932a90a09 (diff) | |
download | cython-372bf0a7ab9f32ea92d0d15bb952f235f9a32567.tar.gz |
Remove redundant grouping from regex.
-rw-r--r-- | Cython/Build/Dependencies.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py index 8b4a78992..30afd5609 100644 --- a/Cython/Build/Dependencies.py +++ b/Cython/Build/Dependencies.py @@ -399,8 +399,10 @@ dependency_regex = re.compile(r"(?:^\s*from +([0-9a-zA-Z_.]+) +cimport)|" r"(?:^\s*cimport +([0-9a-zA-Z_.]+(?: *, *[0-9a-zA-Z_.]+)*))|" r"(?:^\s*cdef +extern +from +['\"]([^'\"]+)['\"])|" r"(?:^\s*include +['\"]([^'\"]+)['\"])", re.M) -dependency_after_from_regex = re.compile(r"(?:^\s+\(((?:[0-9a-zA-Z_., ]*)*)\)[#\n])|" - r"(?:^\s+((?:[0-9a-zA-Z_., ]*))[#\n])", re.M) +dependency_after_from_regex = re.compile( + r"(?:^\s+\(([0-9a-zA-Z_., ]*)\)[#\n])|" + r"(?:^\s+([0-9a-zA-Z_., ]*)[#\n])", + re.M) def normalize_existing(base_path, rel_paths): |