From 6719c803a5eb9fe273fd72536af463cf3fdbd228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=91=E8=BD=BB=E7=8B=82?= <1677568218@qq.com> Date: Wed, 23 Aug 2023 03:25:20 +0800 Subject: [PATCH] ci: test --- .github/actions_scripts/parse.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/actions_scripts/parse.py b/.github/actions_scripts/parse.py index 5722640..7711107 100644 --- a/.github/actions_scripts/parse.py +++ b/.github/actions_scripts/parse.py @@ -37,16 +37,21 @@ def check_module(module_name: str) -> bool: """Check module name.""" import importlib if module_name == "null": + print("module_name is null")# noqa: T201 return False if "-" in module_name: + print("module_name contains '-'")# noqa: T201 return False try: importlib.invalidate_caches() module = importlib.import_module(module_name) importlib.reload(module) + print(f"module_name: {module_name}")# noqa: T201 except Exception: # noqa: BLE001 + print("module_name is invalid")# noqa: T201 return False else: + print("module_name is valid")# noqa: T201 return True def parse_title(title: str) -> dict[str, Any]: @@ -65,6 +70,7 @@ def main() -> None: pypi_name = os.environ["PYPI_NAME"] module_name = os.environ["MODULE_NAME"] try: + print(f"module_name: {module_name}")# noqa: T201 if check_module(module_name) is False: set_action_outputs({"result": "error", "output": "输入的module_name存在问题"}) return