This commit is contained in:
Przemyslaw Wysocki 2023-04-11 23:06:54 +02:00 committed by GitHub
parent 3740ba9226
commit ea213f687a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -67,7 +67,7 @@ def read_requirements(path: str) -> List[str]:
# get rid of newlines
line = line.replace('\n', '')
# if version is specified (non-word chars present)
if re.search('\W', line):
if re.search('(~|=|<|>|;)', line):
requirements.append(line)
# else get version from constraints
else:

View File

@ -72,7 +72,7 @@ def read_requirements(path: str) -> List[str]:
# get rid of newlines
line = line.replace('\n', '')
# if version is specified (non-word chars present)
if re.search('\W', line):
if re.search('(~|=|<|>|;)', line):
requirements.append(line)
# else get version from constraints
else:

View File

@ -252,7 +252,7 @@ def read_requirements(path: str) -> List[str]:
# get rid of newlines
line = line.replace('\n', '')
# if version is specified (non-word chars present)
if re.search('\W', line):
if re.search('(~|=|<|>|;)', line):
requirements.append(line)
# else get version from constraints
else: