mypy/ps
This commit is contained in:
parent
2ad223fa83
commit
68cbe3cd88
1 changed files with 5 additions and 4 deletions
|
@ -9,10 +9,11 @@ def get_tuples_args(*items: str | tuple[str, ...]) -> list[str]:
|
|||
"""Turn arguments tuples into an arguments list."""
|
||||
args: list[str] = []
|
||||
for item in items:
|
||||
if type(item) is tuple:
|
||||
args.extend(item)
|
||||
else:
|
||||
match item:
|
||||
case str():
|
||||
args.append(item)
|
||||
case tuple():
|
||||
args.extend(item)
|
||||
return args
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue