Skip to content
Merged
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/usethis/_integrations/backend/uv/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from usethis._integrations.backend.uv.call import call_uv_subprocess
from usethis._integrations.backend.uv.errors import UVSubprocessFailedError

FALLBACK_UV_VERSION = "0.9.20"
FALLBACK_UV_VERSION = "0.9.21"


def get_uv_version() -> str:
Expand Down
17 changes: 6 additions & 11 deletions src/usethis/_integrations/ci/bitbucket/cache.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
from __future__ import annotations

from typing import TYPE_CHECKING

from usethis._console import tick_print
from usethis._integrations.ci.bitbucket import schema
from usethis._integrations.ci.bitbucket.init import (
ensure_bitbucket_pipelines_config_exists,
)
from usethis._integrations.ci.bitbucket.schema import Definitions
from usethis._integrations.ci.bitbucket.yaml import BitbucketPipelinesYAMLManager

if TYPE_CHECKING:
from usethis._integrations.ci.bitbucket.schema import Cache, PipelinesConfiguration


def get_cache_by_name() -> dict[str, Cache]:
def get_cache_by_name() -> dict[str, schema.Cache]:
mgr = BitbucketPipelinesYAMLManager()
config = mgr.model_validate()

Expand All @@ -28,7 +23,7 @@ def get_cache_by_name() -> dict[str, Cache]:
return cache_by_name


def add_caches(cache_by_name: dict[str, Cache]) -> None:
def add_caches(cache_by_name: dict[str, schema.Cache]) -> None:
ensure_bitbucket_pipelines_config_exists()

mgr = BitbucketPipelinesYAMLManager()
Expand All @@ -38,10 +33,10 @@ def add_caches(cache_by_name: dict[str, Cache]) -> None:


def _add_caches_via_model(
cache_by_name: dict[str, Cache], *, model: PipelinesConfiguration
cache_by_name: dict[str, schema.Cache], *, model: schema.PipelinesConfiguration
) -> None:
if model.definitions is None:
model.definitions = Definitions()
model.definitions = schema.Definitions()
if model.definitions.caches is None:
model.definitions.caches = {}

Expand Down Expand Up @@ -73,7 +68,7 @@ def remove_cache(cache: str) -> None:
mgr.commit_model(model)


def _cache_exists(name: str, *, model: PipelinesConfiguration) -> bool:
def _cache_exists(name: str, *, model: schema.PipelinesConfiguration) -> bool:
if model.definitions is None or model.definitions.caches is None:
return False

Expand Down
Loading