Skip to content

Commit

Permalink
Use default profile values yb default when another profile is active
Browse files Browse the repository at this point in the history
  • Loading branch information
palinatolmach committed Oct 8, 2024
1 parent 4f11b18 commit ef3f58f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyk/src/pyk/cli/pyk.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,9 @@ def get_profile(toml_profile: dict[str, Any], profile_list: list[str]) -> dict[s
if len(profile_list) == 0 or profile_list[0] not in toml_profile:
return {k: v for k, v in toml_profile.items() if type(v) is not dict}
elif len(profile_list) == 1:
return {k: v for k, v in toml_profile[profile_list[0]].items() if type(v) is not dict}
active_profile = {k: v for k, v in toml_profile.get(profile_list[0], {}).items() if type(v) is not dict}
default_profile = {k: v for k, v in toml_profile.get('default', {}).items() if type(v) is not dict}
return {**default_profile, **active_profile}
return get_profile(toml_profile[profile_list[0]], profile_list[1:])

toml_args: dict[str, Any] = {}
Expand Down

0 comments on commit ef3f58f

Please sign in to comment.