From 052574d82167f7d699b8078204d793d0b8a6c9ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Me=C3=9Fmer?= Date: Tue, 13 Sep 2016 18:17:17 +0200 Subject: [PATCH] Add missing type hints to subprocess.pyi (#539) --- stdlib/3/subprocess.pyi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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: ...