From 68cbe3cd88db3d39652a831e277c12a1bdb342e7 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 14 Sep 2024 00:13:59 +0200 Subject: [PATCH] mypy/ps --- rwx/ps/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rwx/ps/__init__.py b/rwx/ps/__init__.py index e18e250..0bbab9c 100644 --- a/rwx/ps/__init__.py +++ b/rwx/ps/__init__.py @@ -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