11import os
22from pathlib import Path
3- from typing import Any , Dict , List
3+ from typing import Any
44
55from multiversx_sdk import NetworkProviderConfig
66
@@ -81,12 +81,12 @@ def delete_value(name: str):
8181 write_file (data )
8282
8383
84- def get_active () -> Dict [str , Any ]:
84+ def get_active () -> dict [str , Any ]:
8585 data = read_file ()
8686 configs = data .get ("configurations" , {})
8787 active_config_name : str = data .get ("active" , "default" )
88- empty_config : Dict [str , Any ] = dict ()
89- result : Dict [str , Any ] = configs .get (active_config_name , empty_config )
88+ empty_config : dict [str , Any ] = dict ()
89+ result : dict [str , Any ] = configs .get (active_config_name , empty_config )
9090
9191 return result
9292
@@ -143,7 +143,7 @@ def _guard_valid_config_deletion(name: str):
143143 raise errors .ConfigurationProtectedError (name )
144144
145145
146- def get_defaults () -> Dict [str , Any ]:
146+ def get_defaults () -> dict [str , Any ]:
147147 return {
148148 "dependencies.vmtools.tag" : "v1.5.24" ,
149149 "dependencies.vmtools.urlTemplate.linux" : "https://github.com/multiversx/mx-chain-vm-go/archive/{TAG}.tar.gz" ,
@@ -179,20 +179,20 @@ def resolve_config_path() -> Path:
179179 return GLOBAL_CONFIG_PATH
180180
181181
182- def read_file () -> Dict [str , Any ]:
182+ def read_file () -> dict [str , Any ]:
183183 config_path = resolve_config_path ()
184184 if config_path .exists ():
185- data : Dict [str , Any ] = utils .read_json_file (config_path )
185+ data : dict [str , Any ] = utils .read_json_file (config_path )
186186 return data
187187 return dict ()
188188
189189
190- def write_file (data : Dict [str , Any ]):
190+ def write_file (data : dict [str , Any ]):
191191 config_path = resolve_config_path ()
192192 utils .write_json_file (str (config_path ), data )
193193
194194
195- def add_config_args (argv : List [str ]) -> List [str ]:
195+ def add_config_args (argv : list [str ]) -> list [str ]:
196196 try :
197197 command , subcommand , * _ = argv
198198 except ValueError :
@@ -210,8 +210,8 @@ def add_config_args(argv: List[str]) -> List[str]:
210210 return final_args
211211
212212
213- def determine_final_args (argv : List [str ], config_args : Dict [str , Any ]) -> List [str ]:
214- extra_args : List [str ] = []
213+ def determine_final_args (argv : list [str ], config_args : dict [str , Any ]) -> list [str ]:
214+ extra_args : list [str ] = []
215215 for key , value in config_args .items ():
216216 key_arg = f"--{ key } "
217217 # arguments from the command line override the config
@@ -222,9 +222,9 @@ def determine_final_args(argv: List[str], config_args: Dict[str, Any]) -> List[s
222222 extra_args .append (key_arg )
223223 if value is True :
224224 continue
225- if isinstance (value , List ):
226- for item in value :
227- extra_args .append (str (item ))
225+ if isinstance (value , list ):
226+ for item in value : # type: ignore
227+ extra_args .append (str (item )) # type: ignore
228228 else :
229229 extra_args .append (str (value ))
230230
0 commit comments