putting @overload decorator back to getsockopt method

This commit is contained in:
Filip Hron
2016-03-02 23:09:27 +01:00
parent 2ae555c144
commit 0a11b5e898
2 changed files with 14 additions and 33 deletions

View File

@@ -5,7 +5,7 @@
# see: http://hg.python.org/cpython/file/3d0686d90f55/Lib/socket.py
# see: http://nullege.com/codes/search/socket
from typing import Any, Tuple, Union, List
from typing import Any, Tuple, Union, List, overload
# ----- variables and constants -----
@@ -292,7 +292,12 @@ class socket:
# return value is an address
def getpeername(self) -> Any: ...
def getsockname(self) -> Any: ...
@overload
def getsockopt(self, level: int, optname: str) -> int: ...
@overload
def getsockopt(self, level: int, optname: str, buflen: int) -> bytes: ...
def gettimeout(self) -> float: ...
def ioctl(self, control: object,
option: Tuple[int, int, int]) -> None: ...