diff --git a/stdlib/2and3/socket.pyi b/stdlib/2and3/socket.pyi index aa4fde1ee..6cfb40d0a 100644 --- a/stdlib/2and3/socket.pyi +++ b/stdlib/2and3/socket.pyi @@ -782,7 +782,7 @@ def gethostbyname(hostname: str) -> str: ... def gethostbyname_ex(hostname: str) -> Tuple[str, List[str], List[str]]: ... def gethostname() -> str: ... def gethostbyaddr(ip_address: str) -> Tuple[str, List[str], List[str]]: ... -def getnameinfo(sockaddr: Union[Tuple[str, int], Tuple[str, int, int, int]], flags: int) -> Tuple[str, int]: ... +def getnameinfo(sockaddr: Union[Tuple[str, int], Tuple[str, int, int, int]], flags: int) -> Tuple[str, str]: ... def getprotobyname(protocolname: str) -> int: ... def getservbyname(servicename: str, protocolname: str = ...) -> int: ... def getservbyport(port: int, protocolname: str = ...) -> str: ... diff --git a/stdlib/3/asyncio/base_events.pyi b/stdlib/3/asyncio/base_events.pyi index ddecc99bc..56010b2b5 100644 --- a/stdlib/3/asyncio/base_events.pyi +++ b/stdlib/3/asyncio/base_events.pyi @@ -87,7 +87,9 @@ class BaseEventLoop(AbstractEventLoop, metaclass=ABCMeta): proto: int = ..., flags: int = ..., ) -> List[Tuple[int, int, int, str, Tuple[Any, ...]]]: ... - async def getnameinfo(self, sockaddr: Tuple[Any, ...], flags: int = ...) -> Tuple[str, int]: ... + async def getnameinfo( + self, sockaddr: Union[Tuple[str, int], Tuple[str, int, int, int]], flags: int = ... + ) -> Tuple[str, str]: ... if sys.version_info >= (3, 8): @overload async def create_connection( diff --git a/stdlib/3/asyncio/events.pyi b/stdlib/3/asyncio/events.pyi index 31fdb7d8a..b044bd095 100644 --- a/stdlib/3/asyncio/events.pyi +++ b/stdlib/3/asyncio/events.pyi @@ -134,7 +134,9 @@ class AbstractEventLoop(metaclass=ABCMeta): flags: int = ..., ) -> List[Tuple[int, int, int, str, Tuple[Any, ...]]]: ... @abstractmethod - async def getnameinfo(self, sockaddr: Tuple[Any, ...], flags: int = ...) -> Tuple[str, int]: ... + async def getnameinfo( + self, sockaddr: Union[Tuple[str, int], Tuple[str, int, int, int]], flags: int = ... + ) -> Tuple[str, str]: ... if sys.version_info >= (3, 8): @overload @abstractmethod