mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Use PEP 585 syntax wherever possible (#6717)
This commit is contained in:
@@ -2,7 +2,7 @@ import sys
|
||||
from _typeshed import structseq
|
||||
from threading import Thread
|
||||
from types import TracebackType
|
||||
from typing import Any, Callable, NoReturn, Optional, Tuple, Type
|
||||
from typing import Any, Callable, NoReturn, Optional, Type
|
||||
from typing_extensions import final
|
||||
|
||||
error = RuntimeError
|
||||
@@ -21,7 +21,7 @@ class LockType:
|
||||
self, type: Type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
def start_new_thread(function: Callable[..., Any], args: Tuple[Any, ...], kwargs: dict[str, Any] = ...) -> int: ...
|
||||
def start_new_thread(function: Callable[..., Any], args: tuple[Any, ...], kwargs: dict[str, Any] = ...) -> int: ...
|
||||
def interrupt_main() -> None: ...
|
||||
def exit() -> NoReturn: ...
|
||||
def allocate_lock() -> LockType: ...
|
||||
@@ -34,7 +34,7 @@ if sys.version_info >= (3, 8):
|
||||
def get_native_id() -> int: ... # only available on some platforms
|
||||
@final
|
||||
class _ExceptHookArgs(
|
||||
structseq[Any], Tuple[Type[BaseException], Optional[BaseException], Optional[TracebackType], Optional[Thread]]
|
||||
structseq[Any], tuple[Type[BaseException], Optional[BaseException], Optional[TracebackType], Optional[Thread]]
|
||||
):
|
||||
@property
|
||||
def exc_type(self) -> Type[BaseException]: ...
|
||||
|
||||
Reference in New Issue
Block a user