Skip to content
This repository was archived by the owner on Jan 18, 2026. It is now read-only.

Commit aa3c0e6

Browse files
committed
fix: check line
1 parent e560f78 commit aa3c0e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sync_uv_pre_commit/package.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ def parse_lockfile(lock_file: str | PathLike[str]) -> dict[str, Requirement]:
2222
lock_file = Path(lock_file)
2323
with lock_file.open() as file:
2424
return {
25-
(req := Requirement(line.strip())).name: req
26-
for line in file.readlines()
27-
if not line.startswith(("#", "-e"))
25+
(req := Requirement(line)).name: req
26+
for _line in file.readlines()
27+
if (line := _line.strip()) and not line.startswith(("#", "-e"))
2828
}
2929

3030

0 commit comments

Comments
 (0)