Fixed parameter and return types of getnameinfo() everywhere (#4305)

This commit is contained in:
Alex Grönholm
2020-07-03 16:46:02 +03:00
committed by GitHub
parent c0e9c4f4c5
commit f9d469ac2b
3 changed files with 7 additions and 3 deletions

View File

@@ -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(

View File

@@ -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