fix type of loop.sock_connect (#3073)

This commit is contained in:
Jelle Zijlstra
2019-06-21 08:31:51 -07:00
committed by Sebastian Rittau
parent ada0570efc
commit b0c9fa4530
2 changed files with 4 additions and 4 deletions

View File

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

View File

@@ -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]]: ...