mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-25 19:17:16 +08:00
Use TypeAlias where possible for type aliases (#7630)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from typing import Callable, Mapping, Sequence
|
||||
from typing_extensions import Final
|
||||
from typing_extensions import Final, TypeAlias
|
||||
|
||||
paFloat32: Final[int]
|
||||
paInt32: Final[int]
|
||||
@@ -67,10 +67,10 @@ paPrimingOutput: Final[int]
|
||||
paMacCoreStreamInfo: PaMacCoreStreamInfo
|
||||
|
||||
# Auxiliary types
|
||||
_ChannelMap = Sequence[int]
|
||||
_PaHostApiInfo = Mapping[str, str | int]
|
||||
_PaDeviceInfo = Mapping[str, str | int | float]
|
||||
_StreamCallback = Callable[[bytes | None, int, Mapping[str, float], int], tuple[bytes | None, int]]
|
||||
_ChannelMap: TypeAlias = Sequence[int]
|
||||
_PaHostApiInfo: TypeAlias = Mapping[str, str | int]
|
||||
_PaDeviceInfo: TypeAlias = Mapping[str, str | int | float]
|
||||
_StreamCallback: TypeAlias = Callable[[bytes | None, int, Mapping[str, float], int], tuple[bytes | None, int]]
|
||||
|
||||
def get_format_from_width(width: int, unsigned: bool = ...) -> int: ...
|
||||
def get_portaudio_version() -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user