Skip to content

Commit b27342c

Browse files
Bordacarmocca
authored andcommitted
remove parsing comments (#7958)
* remove parsing comments * \s Co-authored-by: Carlos Mocholí <[email protected]>
1 parent c888ec1 commit b27342c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

requirements/adjust_versions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ def main(path_req: str, torch_version: Optional[str] = None) -> None:
4040

4141
with open(path_req, "r") as fp:
4242
req = fp.read()
43+
# remove comments
44+
req = re.sub(rf"\s*#.*{os.linesep}", os.linesep, req)
4345

4446
latest = find_latest(torch_version)
4547
for lib, version in latest.items():

0 commit comments

Comments
 (0)