Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Oct 15, 2024
1 parent 2562983 commit 6377f2f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/tools/gen_requirements_txt.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@


def gen_requirements_txt(pyproject_cfg: dict[str, Any]) -> str:
_res: list[str] = [
"# Automatically generated from pyproject.toml by gen_requirements_txt.py script.",
"# DO NOT EDIT! Only for reference use.",
]
try:
_res: list[str] = pyproject_cfg["project"]["dependencies"]
return "\n".join(_res)
_res.extend(pyproject_cfg["project"]["dependencies"])
except KeyError:
return ""
print("WARNING: no deps are defined in pyproject.toml")
return "\n".join(_res)


if __name__ == "__main__":
Expand Down

0 comments on commit 6377f2f

Please sign in to comment.