mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
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:
committed by
Guido van Rossum
parent
e25b882041
commit
96ba62503b
@@ -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]],
|
||||
|
||||
Reference in New Issue
Block a user