From 04d799f656b4683ed05631f30d130879066e9835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Rousset?= Date: Wed, 10 Aug 2016 22:37:01 +0200 Subject: [PATCH] fix unprecise type in sys.exc_info in py2 (#466) --- stdlib/2.7/sys.pyi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stdlib/2.7/sys.pyi b/stdlib/2.7/sys.pyi index 225d585e3..e37332898 100644 --- a/stdlib/2.7/sys.pyi +++ b/stdlib/2.7/sys.pyi @@ -1,7 +1,8 @@ """Stubs for the 'sys' module.""" from typing import ( - IO, Union, List, Sequence, Any, Dict, Tuple, BinaryIO, Optional, Callable, overload + IO, Union, List, Sequence, Any, Dict, Tuple, BinaryIO, Optional, Callable, + overload, Type, ) from types import FrameType, ModuleType, TracebackType, ClassType @@ -112,7 +113,7 @@ def __excepthook__(type_: type, value: BaseException, traceback: TracebackType) def exc_clear() -> None: raise DeprecationWarning() # TODO should be a union of tuple, see mypy#1178 -def exc_info() -> Tuple[Optional[type], +def exc_info() -> Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]]: ...