mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Use TypeAlias where possible for type aliases (#7630)
This commit is contained in:
@@ -3,12 +3,13 @@ import sys
|
||||
from builtins import type as Type # alias to avoid name clashes with property named "type"
|
||||
from types import TracebackType
|
||||
from typing import Any, BinaryIO, Iterable, NoReturn, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
# These are based in socket, maybe move them out into _typeshed.pyi or such
|
||||
_Address = tuple[Any, ...] | str
|
||||
_RetAddress = Any
|
||||
_WriteBuffer = bytearray | memoryview
|
||||
_CMSG = tuple[int, int, bytes]
|
||||
_Address: TypeAlias = tuple[Any, ...] | str
|
||||
_RetAddress: TypeAlias = Any
|
||||
_WriteBuffer: TypeAlias = bytearray | memoryview
|
||||
_CMSG: TypeAlias = tuple[int, int, bytes]
|
||||
|
||||
class TransportSocket:
|
||||
def __init__(self, sock: socket.socket) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user