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."""
args: list[str] = []
for item in items:
if type(item) is tuple:
args.extend(item)
else:
args.append(item)
match item:
case str():
args.append(item)
case tuple():
args.extend(item)
return args