-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Toward #1130 in src\usethis\_integrations\backend\uv\version.py
Draft:
import json
from usethis._integrations.backend.uv.call import call_uv_subprocess
from usethis._integrations.backend.uv.errors import UVSubprocessFailedError
FALLBACK_UV_VERSION = "0.9.9"
def get_uv_version() -> str:
try:
json_str = call_uv_subprocess(
["self", "version", "--output-format=json"],
change_toml=True,
)
except UVSubprocessFailedError:
return FALLBACK_UV_VERSION
json_dict = json.loads(json_str)
return json_dict.get("version", FALLBACK_UV_VERSION)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request