mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
improve asyncio.AbstractEventLoop.getaddrinfo() (#1867)
The signature should match that of socket.getaddrinfo()
This commit is contained in:
@@ -96,7 +96,7 @@ class AbstractEventLoop(metaclass=ABCMeta):
|
||||
@coroutine
|
||||
# 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(self, host: str, port: int, *,
|
||||
def getaddrinfo(self, host: Optional[str], port: Union[str, int, None], *,
|
||||
family: int = ..., type: int = ..., proto: int = ..., flags: int = ...) -> Generator[Any, None, List[Tuple[int, int, int, str, Tuple[Any, ...]]]]: ...
|
||||
@abstractmethod
|
||||
@coroutine
|
||||
|
||||
Reference in New Issue
Block a user