exp init: minor refactor on way it returns prompted values

This commit is contained in:
Saugat Pachhai (सौगात)
2021-11-02 14:57:40 +05:45
committed by Saugat Pachhai
parent 208ccb2430
commit 80a52e65ad
+6 -7
View File
@@ -131,8 +131,10 @@ def init_interactive(
provided.keys(), ["live"] if live else ["metrics", "plots"]
)
ret: Dict[str, str] = {}
if not (primary or secondary):
return {}
return ret
message = ui.rich_text.assemble(
"This command will guide you to set up a ",
@@ -162,12 +164,9 @@ def init_interactive(
ui.error_write(tree, styled=True)
ui.error_write()
return compact(
{
**_prompts(primary, defaults),
**_prompts(secondary, defaults),
}
)
ret.update(_prompts(primary, defaults))
ret.update(_prompts(secondary, defaults))
return compact(ret)
def _check_stage_exists(