From 70e39d9ad2ea90a330b12b0337c16f7a671ed0bc Mon Sep 17 00:00:00 2001 From: David Euresti Date: Tue, 21 Feb 2017 12:38:49 -0800 Subject: [PATCH] Fix and unify type of socket.getaddrinfo --- stdlib/2/socket.pyi | 3 ++- stdlib/3/socket.pyi | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/stdlib/2/socket.pyi b/stdlib/2/socket.pyi index 77525aa78..83ac7493f 100644 --- a/stdlib/2/socket.pyi +++ b/stdlib/2/socket.pyi @@ -337,7 +337,8 @@ def create_connection(address: Tuple[str, int], # the 5th tuple item is an address def getaddrinfo( host: Optional[str], port: Union[str, int, None], family: int = ..., - socktype: int = ..., proto: int = ..., flags: int = ...) -> List[Tuple[int, int, int, str, Union[Tuple[str, int], Tuple[str, int, int, int]]]]: + socktype: int = ..., proto: int = ..., + flags: int = ...) -> List[Tuple[int, int, int, str, Union[Tuple[str, int], Tuple[str, int, int, int]]]]: ... def getfqdn(name: str = ...) -> str: ... diff --git a/stdlib/3/socket.pyi b/stdlib/3/socket.pyi index e0c21b08e..f6c727898 100644 --- a/stdlib/3/socket.pyi +++ b/stdlib/3/socket.pyi @@ -332,8 +332,9 @@ def create_connection(address: Tuple[str, int], # the 5th tuple item is an address def getaddrinfo( - host: str, port: int, family: int = ..., type: int = ..., proto: int = ..., - flags: int = ...) -> List[Tuple[int, int, int, str, tuple]]: + host: Optional[str], port: Union[str, int, None], family: int = ..., + socktype: int = ..., proto: int = ..., + flags: int = ...) -> List[Tuple[int, int, int, str, Union[Tuple[str, int], Tuple[str, int, int, int]]]]: ... def getfqdn(name: str = ...) -> str: ...