Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/colab_cli/auto_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
def get_app_version() -> str:
"""Return the installed package version, falling back to the git short hash."""
try:
return installed_version("colab")
return installed_version("google-colab-cli")
except (PackageNotFoundError, InvalidVersion):
pass

Expand Down
4 changes: 4 additions & 0 deletions tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def test_version_installed():
result = runner.invoke(app, ["version"])
assert result.exit_code == 0
assert "Version: 0.2.0" in result.output
# Guard against a silent regression if the PyPI distribution name
# changes again: importlib.metadata.version() must be called with
# the distribution name exactly as it appears in pyproject.toml.
mock_version.assert_called_with("google-colab-cli")


def test_version_git_fallback():
Expand Down