11import sys
2+ from collections .abc import Callable
23from threading import Thread
34from types import TracebackType
4- from typing import Any , Callable , Dict , NoReturn , Optional , Tuple , Type
5+ from typing import Any , NoReturn , Optional
56
67error = RuntimeError
78
8- def _count () -> int : ...
9-
10- _dangling : Any
11-
129class LockType :
1310 def acquire (self , blocking : bool = ..., timeout : float = ...) -> bool : ...
1411 def release (self ) -> None : ...
1512 def locked (self ) -> bool : ...
1613 def __enter__ (self ) -> bool : ...
1714 def __exit__ (
18- self , type : Optional [ Type [ BaseException ]] , value : Optional [ BaseException ] , traceback : Optional [ TracebackType ]
15+ self , type : type [ BaseException ]| None , value : BaseException | None , traceback : TracebackType | None
1916 ) -> None : ...
2017
21- def start_new_thread (function : Callable [..., Any ], args : Tuple [ Any , ...], kwargs : Dict [str , Any ] = ...) -> int : ...
18+ def start_new_thread (function : Callable [..., ... ], args : tuple [... , ...], kwargs : dict [str , Any ] = ...) -> int : ...
2219def allocate_lock () -> LockType : ...
2320def exit () -> NoReturn : ...
2421def get_ident () -> int : ...
@@ -28,13 +25,13 @@ TIMEOUT_MAX: float
2825
2926if sys .version_info >= (3 , 8 ):
3027
31- class _ExceptHookArgs (Tuple [ Type [BaseException ], Optional [BaseException ], Optional [TracebackType ], Optional [Thread ]]):
28+ class _ExceptHookArgs (tuple [ type [BaseException ], Optional [BaseException ], Optional [TracebackType ], Optional [Thread ]]):
3229 @property
33- def exc_type (self ) -> Type [BaseException ]: ...
30+ def exc_type (self ) -> type [BaseException ]: ...
3431 @property
35- def exc_value (self ) -> Optional [ BaseException ] : ...
32+ def exc_value (self ) -> BaseException | None : ...
3633 @property
37- def exc_traceback (self ) -> Optional [ TracebackType ] : ...
34+ def exc_traceback (self ) -> TracebackType | None : ...
3835 @property
39- def thread (self ) -> Optional [ Thread ] : ...
36+ def thread (self ) -> Thread | None : ...
4037 _excepthook : Callable [[_ExceptHookArgs ], Any ]
0 commit comments