From ef3f58fac2fe208e778890da4dd19bc2fee26191 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Tue, 8 Oct 2024 19:01:18 +0800 Subject: [PATCH] Use `default` profile values yb default when another profile is active --- pyk/src/pyk/cli/pyk.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyk/src/pyk/cli/pyk.py b/pyk/src/pyk/cli/pyk.py index f4a50ce32a9..077f18358a4 100644 --- a/pyk/src/pyk/cli/pyk.py +++ b/pyk/src/pyk/cli/pyk.py @@ -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] = {}