|
1 | 1 | import sys |
2 | 2 | from threading import Thread |
3 | 3 | from types import TracebackType |
4 | | -from typing import Any, Callable, Dict, NamedTuple, NoReturn, Optional, Tuple, Type |
| 4 | +from typing import Any, Callable, Dict, NoReturn, Optional, Tuple, Type |
5 | 5 |
|
6 | 6 | error = RuntimeError |
7 | 7 |
|
@@ -29,10 +29,13 @@ TIMEOUT_MAX: float |
29 | 29 |
|
30 | 30 | if sys.version_info >= (3, 8): |
31 | 31 | def get_native_id() -> int: ... # only available on some platforms |
32 | | - class ExceptHookArgs(NamedTuple): |
33 | | - exc_type: Type[BaseException] |
34 | | - exc_value: Optional[BaseException] |
35 | | - exc_traceback: Optional[TracebackType] |
36 | | - thread: Optional[Thread] |
37 | | - def _ExceptHookArgs(args: Any) -> ExceptHookArgs: ... |
38 | | - _excepthook: Callable[[ExceptHookArgs], Any] |
| 32 | + class _ExceptHookArgs(Tuple[Type[BaseException], Optional[BaseException], Optional[TracebackType], Optional[Thread]]): |
| 33 | + @property |
| 34 | + def exc_type(self) -> Type[BaseException]: ... |
| 35 | + @property |
| 36 | + def exc_value(self) -> Optional[BaseException]: ... |
| 37 | + @property |
| 38 | + def exc_traceback(self) -> Optional[TracebackType]: ... |
| 39 | + @property |
| 40 | + def thread(self) -> Optional[Thread]: ... |
| 41 | + _excepthook: Callable[[_ExceptHookArgs], Any] |
0 commit comments