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(