1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Directly store re.search

This commit is contained in:
Xavier Fernandez 2015-10-09 22:44:21 +02:00
parent 06d71200e0
commit 67674e26d3

View file

@ -26,7 +26,7 @@ def freeze(
skip_match = None
if skip_regex:
skip_match = re.compile(skip_regex)
skip_match = re.compile(skip_regex).search
dependency_links = []
@ -55,7 +55,7 @@ def freeze(
for line in req_file:
if (not line.strip() or
line.strip().startswith('#') or
(skip_match and skip_match.search(line)) or
(skip_match and skip_match(line)) or
line.startswith((
'-r', '--requirement',
'-Z', '--always-unzip',