mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use TypeAlias where possible for type aliases (#7630)
This commit is contained in:
@@ -3,7 +3,7 @@ from _typeshed import structseq
|
||||
from enum import IntEnum
|
||||
from types import FrameType
|
||||
from typing import Any, Callable, Iterable, Union
|
||||
from typing_extensions import Final, final
|
||||
from typing_extensions import Final, TypeAlias, final
|
||||
|
||||
NSIG: int
|
||||
|
||||
@@ -60,8 +60,8 @@ class Handlers(IntEnum):
|
||||
SIG_DFL: Handlers
|
||||
SIG_IGN: Handlers
|
||||
|
||||
_SIGNUM = int | Signals
|
||||
_HANDLER = Union[Callable[[int, FrameType | None], Any], int, Handlers, None]
|
||||
_SIGNUM: TypeAlias = int | Signals
|
||||
_HANDLER: TypeAlias = Union[Callable[[int, FrameType | None], Any], int, Handlers, None]
|
||||
|
||||
def default_int_handler(__signalnum: int, __frame: FrameType | None) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user