From b0c9fa4530fbf28970a9fd0f2d24b3ba685a6ac7 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 21 Jun 2019 08:31:51 -0700 Subject: [PATCH] fix type of loop.sock_connect (#3073) --- stdlib/3/asyncio/base_events.pyi | 4 ++-- stdlib/3/asyncio/events.pyi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/3/asyncio/base_events.pyi b/stdlib/3/asyncio/base_events.pyi index 2262a67f8..31023abf1 100644 --- a/stdlib/3/asyncio/base_events.pyi +++ b/stdlib/3/asyncio/base_events.pyi @@ -1,5 +1,5 @@ import selectors -from socket import socket +from socket import socket, _Address import ssl import sys from typing import Any, Awaitable, Callable, Dict, Generator, List, Optional, Sequence, Tuple, TypeVar, Union, overload @@ -123,7 +123,7 @@ class BaseEventLoop(AbstractEventLoop): @coroutine def sock_sendall(self, sock: socket, data: bytes) -> Generator[Any, None, None]: ... @coroutine - def sock_connect(self, sock: socket, address: str) -> Generator[Any, None, None]: ... + def sock_connect(self, sock: socket, address: _Address) -> Generator[Any, None, None]: ... @coroutine def sock_accept(self, sock: socket) -> Generator[Any, None, Tuple[socket, Any]]: ... # Signal handling. diff --git a/stdlib/3/asyncio/events.pyi b/stdlib/3/asyncio/events.pyi index c81d027ef..3dbd60944 100644 --- a/stdlib/3/asyncio/events.pyi +++ b/stdlib/3/asyncio/events.pyi @@ -1,5 +1,5 @@ import selectors -from socket import socket +from socket import socket, _Address import ssl import sys from typing import Any, Awaitable, Callable, Dict, Generator, List, Optional, Sequence, Tuple, TypeVar, Union, overload @@ -185,7 +185,7 @@ class AbstractEventLoop(metaclass=ABCMeta): def sock_sendall(self, sock: socket, data: bytes) -> Generator[Any, None, None]: ... @abstractmethod @coroutine - def sock_connect(self, sock: socket, address: str) -> Generator[Any, None, None]: ... + def sock_connect(self, sock: socket, address: _Address) -> Generator[Any, None, None]: ... @abstractmethod @coroutine def sock_accept(self, sock: socket) -> Generator[Any, None, Tuple[socket, Any]]: ...