Skip to content

Commit 391b7fd

Browse files
committed
refactor: update load_profile and _load_profile to return BaseProfile instead of Profile
1 parent 4ad5c35 commit 391b7fd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/copia/cli/utils/profile_loader.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typer import Exit
22

33
from copia.cli.config import (
4-
Profile,
4+
BaseProfile,
55
get_profile,
66
ConfigScope,
77
InvalidConfigError,
@@ -20,7 +20,7 @@
2020
ProfileError
2121
)
2222

23-
def load_profile(profile_name: str, global_flag: bool, local_flag: bool) -> Profile:
23+
def load_profile(profile_name: str, global_flag: bool, local_flag: bool) -> BaseProfile:
2424

2525
if global_flag and local_flag:
2626
error("Cannot use (--global | -g) and (--local | -l) flags at the same time")
@@ -81,6 +81,6 @@ def get_any_profile(profile_name: str):
8181
info("Falling back to global config...")
8282
return _load_profile(profile_name, 'global')
8383

84-
def _load_profile(profile_name: str, scope: ConfigScope) -> Profile:
84+
def _load_profile(profile_name: str, scope: ConfigScope) -> BaseProfile:
8585
info(f"Fetching profiles.{profile_name!r} from {scope!r} config...")
8686
return get_profile(profile_name, scope)

0 commit comments

Comments
 (0)