mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-26 13:51:30 +08:00
fix arg name to socket.getaddrinfo for py3 (#3689)
This commit is contained in:
@@ -732,12 +732,20 @@ if sys.platform == 'win32' and sys.version_info >= (3, 3):
|
||||
# the 5th tuple item is an address
|
||||
# TODO the "Tuple[Any, ...]" should be "Union[Tuple[str, int], Tuple[str, int, int, int]]" but that triggers
|
||||
# https://github.com/python/mypy/issues/2509
|
||||
def getaddrinfo(host: Optional[Union[bytearray, bytes, Text]],
|
||||
port: Union[str, int, None],
|
||||
family: int = ...,
|
||||
socktype: int = ...,
|
||||
proto: int = ...,
|
||||
flags: int = ...) -> List[Tuple[AddressFamily, SocketKind, int, str, Tuple[Any, ...]]]: ...
|
||||
if sys.version_info >= (3,):
|
||||
def getaddrinfo(host: Optional[Union[bytearray, bytes, Text]],
|
||||
port: Union[str, int, None],
|
||||
family: int = ...,
|
||||
type: int = ...,
|
||||
proto: int = ...,
|
||||
flags: int = ...) -> List[Tuple[AddressFamily, SocketKind, int, str, Tuple[Any, ...]]]: ...
|
||||
else:
|
||||
def getaddrinfo(host: Optional[Union[bytearray, bytes, Text]],
|
||||
port: Union[str, int, None],
|
||||
family: int = ...,
|
||||
socktype: int = ...,
|
||||
proto: int = ...,
|
||||
flags: int = ...) -> List[Tuple[AddressFamily, SocketKind, int, str, Tuple[Any, ...]]]: ...
|
||||
|
||||
def getfqdn(name: str = ...) -> str: ...
|
||||
def gethostbyname(hostname: str) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user