Use concrete type in sys.excepthook() (#547)

This is necessary, because exception formatting functions like `traceback.format_exception()` expect to get `Type[BaseException]`, but sys.excepthook only provided `type`
This commit is contained in:
Sebastian Meßmer
2016-09-14 17:03:41 +02:00
committed by Guido van Rossum
parent e25b882041
commit 96ba62503b

View File

@@ -115,7 +115,7 @@ def call_tracing(fn: Callable[..., _T], args: Any) -> _T: ...
def _clear_type_cache() -> None: ...
def _current_frames() -> Dict[int, Any]: ...
def displayhook(value: Optional[int]) -> None: ...
def excepthook(type_: type, value: BaseException,
def excepthook(type_: Type[BaseException], value: BaseException,
traceback: TracebackType) -> None: ...
# TODO should be a union of tuple, see mypy#1178
def exc_info() -> Tuple[Optional[Type[BaseException]],