Skip to content

Commit

Permalink
Update utils/compare_dependency_constraints.py
Browse files Browse the repository at this point in the history
Co-authored-by: dorschw <[email protected]>
  • Loading branch information
shmuel44 and dorschw authored Jul 18, 2024
1 parent 8286c18 commit 70f6039
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions utils/compare_dependency_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ def find_library_line_number(lib_name: str, file_path: Path) -> int | None:
Returns:
- The line number containing the library name, or None if the library is not found.
"""
with file_path.open('r') as file:
for line_number, line in enumerate(file, start=1): # Start counting from line 1
for line_number, line in enumerate(file_path.read_text().splitlines(), start=1): # Start counting from line 1
if lib_name in line:
return line_number

Expand Down

0 comments on commit 70f6039

Please sign in to comment.