1
0
Fork 0
mycli/test/features/steps/utils.py

13 lines
282 B
Python
Raw Permalink Normal View History

import shlex
def parse_cli_args_to_dict(cli_args: str):
args_dict = {}
for arg in shlex.split(cli_args):
if "=" in arg:
key, value = arg.split("=")
args_dict[key] = value
else:
args_dict[arg] = None
return args_dict