"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/
Python
fix: support python pip module installs in registry dates
陈家名f7188b765135
diff --git a/.github/scripts/tests/test_update_registry_dates.py b/.github/scripts/tests/test_update_registry_dates.pyindex 894ee5627..924c4a7dc 100644--- a/.github/scripts/tests/test_update_registry_dates.py+++ b/.github/scripts/tests/test_update_registry_dates.py@@ -54,3 +54,9 @@ def test_extract_npm_package_supports_scoped_package_names():}assert MODULE._extract_npm_package(cli) == "@sentry/cli"+++def test_extract_pypi_package_supports_python_module_invocation():+ install_cmd = "python -m pip install py4csr"++ assert MODULE._extract_pypi_package(install_cmd) == "py4csr"diff --git a/.github/scripts/update_registry_dates.py b/.github/scripts/update_registry_dates.pyindex af1bfcb32..e7585a6e0 100644--- a/.github/scripts/update_registry_dates.py+++ b/.github/scripts/update_registry_dates.py@@ -111,7 +111,11 @@ def _extract_pypi_package(install_cmd: str) -> str | None:return Noneinstall_index = None- if tokens[:3] == ["python3", "-m", "pip"]:+ if (+ len(tokens) >= 3+ and tokens[0] in {"python", "python3"}+ and tokens[1:3] == ["-m", "pip"]+ ):install_index = 3elif tokens[0] in {"pip", "pip3"}:install_index = 1