mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
bench: ignore empty requirements lines (#897)
In particular, this script previously choked on the `home-assistant.in` requirements file because it contains many empty lines.
This commit is contained in:
parent
11b11d04a7
commit
cf62d296b3
1 changed files with 3 additions and 1 deletions
|
@ -261,7 +261,9 @@ class Poetry(Suite):
|
|||
# Parse all dependencies from the requirements file.
|
||||
with open(requirements_file) as fp:
|
||||
requirements = [
|
||||
Requirement(line) for line in fp if not line.lstrip().startswith("#")
|
||||
Requirement(line)
|
||||
for line in fp
|
||||
if not line.lstrip().startswith("#") and len(line.strip()) > 0
|
||||
]
|
||||
|
||||
# Create a Poetry project.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue