Improve socket py2 (#249)

* add vim swap files to gitignore

* add types to socket.socket.send{,all} for py2
This commit is contained in:
Valérian Rousset
2016-06-06 01:51:26 +02:00
committed by Guido van Rossum
parent 2b55989f7d
commit 09e165ec35
2 changed files with 3 additions and 2 deletions

View File

@@ -316,8 +316,8 @@ class socket:
flags: int = ...) -> Any: ...
def recv_into(self, buffer: str, nbytes: int,
flags: int = ...) -> Any: ...
def send(self, data: str, flags=...) -> int: ...
def sendall(self, data: str, flags=...) -> Any:
def send(self, data: str, flags: int = ...) -> int: ...
def sendall(self, data: str, flags: int = ...) -> None:
... # return type: None on success
def sendto(self, data: str, address: Union[tuple, str], flags: int = ...) -> int: ...
def setblocking(self, flag: bool) -> None: ...