common: Add type hints to call helper

master
Felix Stupp 2 years ago
parent 051d4a7ccd
commit ddb248ca62
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -1,9 +1,22 @@
import itertools
import subprocess
from typing import Iterable, List, Literal, TypeVar, Union
def call(args, check=True, stdin=None) -> subprocess.CompletedProcess:
from typing import (
IO,
Iterable,
List,
Literal,
Optional,
Sequence,
TypeVar,
Union,
)
def call(
args: Sequence[str],
check: bool = True,
stdin: Optional[IO] = None,
) -> subprocess.CompletedProcess:
proc = subprocess.run(
args,
capture_output=True,

Loading…
Cancel
Save