Skip to content

Commit 8fa8f12

Browse files
committed
ci: fix ci
1 parent 299168c commit 8fa8f12

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

.github/workflows/ci-test.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,6 @@ jobs:
3737
poetry install --no-interaction --no-ansi
3838
poetry run pip install -e .
3939
40-
# DEBUG: Check package installation
41-
- name: Debug package installation
42-
run: |
43-
echo "=== Installed packages ==="
44-
poetry run pip list | grep -i leetcode || true
45-
echo "=== Package metadata ==="
46-
poetry run python -c "import importlib.metadata; print([p for p in importlib.metadata.distributions() if 'leetcode' in p.metadata['Name'].lower()])" || true
47-
echo "=== Direct version check ==="
48-
poetry run python -c "from importlib.metadata import version; print(version('leetcode-py'))" || echo "leetcode-py not found"
49-
poetry run python -c "from importlib.metadata import version; print(version('leetcodepy'))" || echo "leetcodepy not found"
50-
poetry run python -c "from importlib.metadata import version; print(version('leetcode_py'))" || echo "leetcode_py not found"
51-
5240
- name: Cache Graphviz installation
5341
id: cache-graphviz
5442
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4

leetcode_py/cli/main.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,7 @@
1010

1111

1212
def show_version():
13-
# Try different package name variations
14-
package_names = ["leetcode-py-sdk", "leetcode-py", "leetcodepy", "leetcode_py"]
15-
for name in package_names:
16-
try:
17-
ver = version(name)
18-
typer.echo(f"lcpy version {ver}")
19-
raise typer.Exit()
20-
except Exception:
21-
continue
22-
23-
# Fallback if no package found
24-
typer.echo("lcpy version unknown (package not found)")
13+
typer.echo(f"lcpy version {version('leetcode-py-sdk')}")
2514
raise typer.Exit()
2615

2716

0 commit comments

Comments
 (0)