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."""
|
"""Turn arguments tuples into an arguments list."""
|
||||||
args: list[str] = []
|
args: list[str] = []
|
||||||
for item in items:
|
for item in items:
|
||||||
if type(item) is tuple:
|
match item:
|
||||||
args.extend(item)
|
case str():
|
||||||
else:
|
|
||||||
args.append(item)
|
args.append(item)
|
||||||
|
case tuple():
|
||||||
|
args.extend(item)
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue