diff --git a/stdlib/3/subprocess.pyi b/stdlib/3/subprocess.pyi index fd9e95b89..8af789fb3 100644 --- a/stdlib/3/subprocess.pyi +++ b/stdlib/3/subprocess.pyi @@ -2,7 +2,8 @@ # Based on http://docs.python.org/3.5/library/subprocess.html import sys -from typing import Sequence, Any, Mapping, Callable, Tuple, IO, Optional, Union, List +from typing import Sequence, Any, Mapping, Callable, Tuple, IO, Optional, Union, List, Type +from types import TracebackType if sys.version_info >= (3, 5): @@ -15,7 +16,7 @@ if sys.version_info >= (3, 5): returncode: int, stdout: Union[str, bytes], stderr: Union[str, bytes]) -> None: ... - def check_returncode(self): ... + def check_returncode(self) -> None: ... # Nearly same args as Popen.__init__ except for timeout, input, and check def run(args: Union[str, Sequence[str]], @@ -235,7 +236,7 @@ class Popen: def terminate(self) -> None: ... def kill(self) -> None: ... def __enter__(self) -> 'Popen': ... - def __exit__(self, type, value, traceback) -> bool: ... + def __exit__(self, type: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType]) -> bool: ... def getstatusoutput(cmd: str) -> Tuple[int, str]: ... def getoutput(cmd: str) -> str: ...