Skip to content

Commit

Permalink
style(type): fix typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau committed Aug 9, 2024
1 parent 3855157 commit 25ea79c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion craft_application/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ def _providers_base(cls, base: str) -> craft_providers.bases.BaseAlias | None:
"""
try:
name, channel = base.split("@")
return craft_providers.bases.get_base_alias((name, channel))
return craft_providers.bases.get_base_alias(
craft_providers.bases.BaseName(name, channel)
)
except (ValueError, BaseConfigurationError) as err:
raise ValueError(f"Unknown base {base!r}") from err

Expand Down
4 changes: 2 additions & 2 deletions craft_application/services/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def instance(

def get_base(
self,
base_name: bases.BaseName | tuple[str, str],
base_name: bases.BaseName,
*,
instance_name: str,
**kwargs: bool | str | pathlib.Path | None,
Expand All @@ -164,7 +164,7 @@ def get_base(
# this only applies to our Buildd images (i.e.; Ubuntu)
self.packages.extend(["gpg", "dirmngr"])
return base_class(
alias=alias, # pyright: ignore[reportArgumentType] craft-providers annotations are loose.
alias=alias, # type: ignore[arg-type]
compatibility_tag=f"{self._app.name}-{base_class.compatibility_tag}",
hostname=instance_name,
snaps=self.snaps,
Expand Down

0 comments on commit 25ea79c

Please sign in to comment.