This commit is contained in:
Marc Beninca 2024-09-14 00:13:59 +02:00
parent 2ad223fa83
commit 68cbe3cd88
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -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