From e7e50b6997ea745a558ad3e2f8e652847b64b7e7 Mon Sep 17 00:00:00 2001 From: Filip Hron Date: Thu, 3 Mar 2016 16:55:33 +0100 Subject: [PATCH] attempt to get rid of TODOS, should i edit tests too? --- stdlib/2.7/socket.pyi | 6 ++---- stdlib/3/socket.pyi | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/stdlib/2.7/socket.pyi b/stdlib/2.7/socket.pyi index 1c0c83396..93864c303 100644 --- a/stdlib/2.7/socket.pyi +++ b/stdlib/2.7/socket.pyi @@ -321,8 +321,7 @@ class socket: ... # return type: None on success def sendto(self, data: str, address: Union[tuple, str], flags: int = ...) -> int: ... def setblocking(self, flag: bool) -> None: ... - # TODO None valid for the value argument - def settimeout(self, value: float) -> None: ... + def settimeout(self, value: Union[float, None]) -> None: ... def setsockopt(self, level: int, optname: str, value: Union[int, str]) -> None: ... def shutdown(self, how: int) -> None: ... @@ -359,6 +358,5 @@ def inet_aton(ip_string: str) -> str: ... # ret val 4 bytes in length def inet_ntoa(packed_ip: str) -> str: ... def inet_pton(address_family: int, ip_string: str) -> str: ... def inet_ntop(address_family: int, packed_ip: str) -> str: ... -# TODO the timeout may be None -def getdefaulttimeout() -> float: ... +def getdefaulttimeout() -> Union[float, None]: ... def setdefaulttimeout(timeout: float) -> None: ... diff --git a/stdlib/3/socket.pyi b/stdlib/3/socket.pyi index aeed3508f..dba7b526f 100644 --- a/stdlib/3/socket.pyi +++ b/stdlib/3/socket.pyi @@ -320,8 +320,7 @@ class socket: ... # return type: None on success def sendto(self, data: bytes, address: Union[tuple, str], flags: int = ...) -> int: ... def setblocking(self, flag: bool) -> None: ... - # TODO None valid for the value argument - def settimeout(self, value: float) -> None: ... + def settimeout(self, value: Union[float, None]) -> None: ... def setsockopt(self, level: int, optname: str, value: Union[int, bytes]) -> None: ... def shutdown(self, how: int) -> None: ... @@ -358,6 +357,5 @@ def inet_aton(ip_string: str) -> bytes: ... # ret val 4 bytes in length def inet_ntoa(packed_ip: bytes) -> str: ... def inet_pton(address_family: int, ip_string: str) -> bytes: ... def inet_ntop(address_family: int, packed_ip: bytes) -> str: ... -# TODO the timeout may be None -def getdefaulttimeout() -> float: ... +def getdefaulttimeout() -> Union[float, None]: ... def setdefaulttimeout(timeout: float) -> None: ...