Fix errors in _socket.pyi.

This commit is contained in:
Matthias Kramm
2015-09-22 12:54:57 -07:00
parent cd3c5d6378
commit 5a66e2f21f

View File

@@ -1,3 +1,5 @@
from typing import Tuple, Union, IO, Any, overload
AF_APPLETALK = ... # type: int
AF_ASH = ... # type: int
AF_ATMPVC = ... # type: int
@@ -236,12 +238,11 @@ TIPC_WAIT_FOREVER = ... # type: int
TIPC_WITHDRAWN = ... # type: int
TIPC_ZONE_SCOPE = ... # type: int
has_ipv6: bool
has_ipv6 = ... # type: bool
class error(IOError): ...
class SocketType(object): ...
class SocketType(object):
family = ... # type: int
type = ... # type: int
proto = ... # type: int
@@ -255,7 +256,7 @@ class SocketType(object): ...
raise gaierror
raise timeout
def connect_ex(self, address: tuple) -> int: ...
def dup(self) -> SocketType
def dup(self) -> "SocketType": ...
def fileno(self) -> int: ...
def getpeername(self) -> tuple: ...
def getsockname(self) -> tuple: ...
@@ -263,7 +264,7 @@ class SocketType(object): ...
def gettimeout(self) -> float: ...
def listen(self, backlog: int) -> None:
raise error
def makefile(self, mode: str = ..., buffersize: int = ...) -> file: ...
def makefile(self, mode: str = ..., buffersize: int = ...) -> IO[Any]: ...
def recv(self, buffersize: int, flags: int = ...) -> str: ...
def recv_into(self, buffer: bytearray, nbytes: int = ..., flags: int = ...) -> int: ...
def recvfrom(self, buffersize: int, flags: int = ...) -> tuple: