@@ -137,7 +137,7 @@ from _typeshed import ReadableBuffer, Unused, WriteableBuffer
137137from collections .abc import Iterable
138138from enum import IntEnum , IntFlag
139139from io import BufferedReader , BufferedRWPair , BufferedWriter , IOBase , RawIOBase , TextIOWrapper
140- from typing import Any , Final , Literal , Protocol , SupportsIndex , overload , type_check_only
140+ from typing import Any , Final , Literal , Protocol , SupportsIndex , TypeAlias , overload , type_check_only
141141from typing_extensions import Self
142142
143143__all__ = [
@@ -1576,6 +1576,11 @@ def create_server(
15761576) -> socket : ...
15771577
15781578# The 5th tuple item is the socket address, for IP4, IP6, or IP6 if Python is compiled with --disable-ipv6, respectively.
1579+ _GetAddrInfoResult : TypeAlias = list [
1580+ tuple [Literal [AddressFamily .AF_INET ], SocketKind , int , str , tuple [str , int ]]
1581+ | tuple [Literal [AddressFamily .AF_INET6 ], SocketKind , int , str , tuple [str , int , int , int ] | tuple [int , bytes ]]
1582+ ]
1583+
15791584def getaddrinfo (
15801585 host : bytes | str | None , port : bytes | str | int | None , family : int = 0 , type : int = 0 , proto : int = 0 , flags : int = 0
1581- ) -> list [ tuple [ AddressFamily , SocketKind , int , str , tuple [ str , int ] | tuple [ str , int , int , int ] | tuple [ int , bytes ]]] : ...
1586+ ) -> _GetAddrInfoResult : ...
0 commit comments