summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2018-11-23 14:52:11 +0100
committerStefan Behnel <stefan_ml@behnel.de>2018-11-23 14:52:11 +0100
commit372bf0a7ab9f32ea92d0d15bb952f235f9a32567 (patch)
tree91e87b387edbf5e836977d71960962fb098c309c
parent912d66f9ba11a7c9c96d1e502ebdbf8932a90a09 (diff)
downloadcython-372bf0a7ab9f32ea92d0d15bb952f235f9a32567.tar.gz
Remove redundant grouping from regex.
-rw-r--r--Cython/Build/Dependencies.py6
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):