Use PEP 604 syntax wherever possible (#7493)

This commit is contained in:
Alex Waygood
2022-03-16 15:01:33 +00:00
committed by GitHub
parent 15e21a8dc1
commit 3ab250eec8
174 changed files with 472 additions and 490 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
from typing import Callable, Mapping, Optional, Sequence, Union
from typing import Callable, Mapping, Optional, Sequence
from typing_extensions import Final
paFloat32: Final[int]
@@ -68,8 +68,8 @@ paMacCoreStreamInfo: PaMacCoreStreamInfo
# Auxiliary types
_ChannelMap = Sequence[int]
_PaHostApiInfo = Mapping[str, Union[str, int]]
_PaDeviceInfo = Mapping[str, Union[str, int, float]]
_PaHostApiInfo = Mapping[str, str | int]
_PaDeviceInfo = Mapping[str, str | int | float]
_StreamCallback = Callable[[Optional[bytes], int, Mapping[str, float], int], tuple[Optional[bytes], int]]
def get_format_from_width(width: int, unsigned: bool = ...) -> int: ...