From 2e7019dd853c1f6fb2b2ecee8e438ded38b674d0 Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Sat, 19 Jun 2021 00:25:21 -0500 Subject: Add subscript to subprocess.Popen --- mesonbuild/mesonlib/universal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/mesonlib') diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py index 3ce46f7..b807377 100644 --- a/mesonbuild/mesonlib/universal.py +++ b/mesonbuild/mesonlib/universal.py @@ -1385,7 +1385,7 @@ def partition(pred: T.Callable[[_T], object], iterable: T.Iterable[_T]) -> T.Tup def Popen_safe(args: T.List[str], write: T.Optional[str] = None, stdout: T.Union[T.TextIO, T.BinaryIO, int] = subprocess.PIPE, stderr: T.Union[T.TextIO, T.BinaryIO, int] = subprocess.PIPE, - **kwargs: T.Any) -> T.Tuple[subprocess.Popen, str, str]: + **kwargs: T.Any) -> T.Tuple['subprocess.Popen[str]', str, str]: import locale encoding = locale.getpreferredencoding() # Redirect stdin to DEVNULL otherwise the command run by us here might mess @@ -1408,7 +1408,7 @@ def Popen_safe(args: T.List[str], write: T.Optional[str] = None, def Popen_safe_legacy(args: T.List[str], write: T.Optional[str] = None, stdout: T.Union[T.TextIO, T.BinaryIO, int] = subprocess.PIPE, stderr: T.Union[T.TextIO, T.BinaryIO, int] = subprocess.PIPE, - **kwargs: T.Any) -> T.Tuple[subprocess.Popen, str, str]: + **kwargs: T.Any) -> T.Tuple['subprocess.Popen[str]', str, str]: p = subprocess.Popen(args, universal_newlines=False, close_fds=False, stdout=stdout, stderr=stderr, **kwargs) input_ = None # type: T.Optional[bytes] -- cgit v1.1