From cd4e7403ae6142273b929c024d38b1df0c225f98 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 13 Sep 2024 23:54:32 +0200 Subject: [PATCH] ps/str,... --- rwx/ps/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rwx/ps/__init__.py b/rwx/ps/__init__.py index e45672e..e18e250 100644 --- a/rwx/ps/__init__.py +++ b/rwx/ps/__init__.py @@ -5,7 +5,7 @@ import subprocess from rwx import txt -def get_tuples_args(*items: str | tuple[str]) -> list[str]: +def get_tuples_args(*items: str | tuple[str, ...]) -> list[str]: """Turn arguments tuples into an arguments list.""" args: list[str] = [] for item in items: @@ -16,21 +16,21 @@ def get_tuples_args(*items: str | tuple[str]) -> list[str]: return args -def run(*items: str | tuple[str]) -> subprocess.CompletedProcess: +def run(*items: str | tuple[str, ...]) -> subprocess.CompletedProcess: """Run from a list of arguments tuples.""" return subprocess.run( get_tuples_args(*items), capture_output=False, check=True ) -def run_line(*items: str | tuple[str], charset: str = txt.CHARSET) -> str: +def run_line(*items: str | tuple[str, ...], charset: str = txt.CHARSET) -> str: """Run and return output line.""" line, *_ = run_lines(*items, charset=charset) return line def run_lines( - *items: str | tuple[str], charset: str = txt.CHARSET + *items: str | tuple[str, ...], charset: str = txt.CHARSET ) -> list[str]: """Run and return output lines.""" process = subprocess.run(