From 6377f2f37d39efe2bebe66276ab113e2985f6937 Mon Sep 17 00:00:00 2001 From: "bodong.yang" Date: Tue, 15 Oct 2024 07:19:23 +0000 Subject: [PATCH] minor update --- .github/tools/gen_requirements_txt.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/tools/gen_requirements_txt.py b/.github/tools/gen_requirements_txt.py index 2342b94f9..38ea02db5 100644 --- a/.github/tools/gen_requirements_txt.py +++ b/.github/tools/gen_requirements_txt.py @@ -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__":