File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ def command_convert(
5050
5151 _ , ext = os .path .splitext (workspace_file )
5252 ext = ext .lower ()
53+ to_filetype : t .Literal ["json" , "yaml" ]
5354 if ext == ".json" :
5455 to_filetype = "yaml"
5556 elif ext in [".yaml" , ".yml" ]:
@@ -60,8 +61,11 @@ def command_convert(
6061 configparser = ConfigReader .from_file (workspace_file )
6162 newfile = workspace_file .parent / (str (workspace_file .stem ) + f".{ to_filetype } " )
6263
63- export_kwargs = {"default_flow_style" : False } if to_filetype == "yaml" else {}
64- new_workspace = configparser .dump (format = to_filetype , indent = 2 , ** export_kwargs )
64+ new_workspace = configparser .dump (
65+ format = to_filetype ,
66+ indent = 2 ,
67+ ** {"default_flow_style" : False } if to_filetype == "yaml" else {},
68+ )
6569
6670 if not answer_yes :
6771 if prompt_yes_no (f"Convert to <{ workspace_file } > to { to_filetype } ?" ):
You can’t perform that action at this time.
0 commit comments