Skip to content

Commit

Permalink
remove parsing comments (#7958)
Browse files Browse the repository at this point in the history
* remove parsing comments
* \s

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
  • Loading branch information
Borda and carmocca authored Jun 14, 2021
1 parent 898fb56 commit cca0e75
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions requirements/adjust_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def main(path_req: str, torch_version: Optional[str] = None) -> None:

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

latest = find_latest(torch_version)
for lib, version in latest.items():
Expand Down

0 comments on commit cca0e75

Please sign in to comment.