diff --git a/stdlib/2.7/__builtin__.pyi b/stdlib/2.7/__builtin__.pyi index 1c2c2af6b..e47720477 100644 --- a/stdlib/2.7/__builtin__.pyi +++ b/stdlib/2.7/__builtin__.pyi @@ -238,9 +238,9 @@ class unicode(basestring, Sequence[unicode]): def rindex(self, sub: unicode, start: int = 0, end: int = 0) -> int: ... def rjust(self, width: int, fillchar: unicode = u' ') -> unicode: ... def rpartition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... - def rsplit(self, sep: unicode = ..., maxsplit: int = ...) -> List[unicode]: ... + def rsplit(self, sep: Optional[unicode] = ..., maxsplit: int = ...) -> List[unicode]: ... def rstrip(self, chars: unicode = ...) -> unicode: ... - def split(self, sep: unicode = ..., maxsplit: int = ...) -> List[unicode]: ... + def split(self, sep: Optional[unicode] = ..., maxsplit: int = ...) -> List[unicode]: ... def splitlines(self, keepends: bool = ...) -> List[unicode]: ... def startswith(self, prefix: Union[unicode, Tuple[unicode, ...]], start: int = 0, end: int = ...) -> bool: ... @@ -318,7 +318,7 @@ class str(basestring, Sequence[str]): @overload def rpartition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... @overload - def rsplit(self, sep: str = ..., maxsplit: int = ...) -> List[str]: ... + def rsplit(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ... @overload def rsplit(self, sep: unicode, maxsplit: int = ...) -> List[unicode]: ... @overload @@ -326,7 +326,7 @@ class str(basestring, Sequence[str]): @overload def rstrip(self, chars: unicode) -> unicode: ... @overload - def split(self, sep: str = ..., maxsplit: int = ...) -> List[str]: ... + def split(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ... @overload def split(self, sep: unicode, maxsplit: int = ...) -> List[unicode]: ... def splitlines(self, keepends: bool = ...) -> List[str]: ... @@ -401,9 +401,9 @@ class bytearray(MutableSequence[int]): def rindex(self, sub: str, start: int = 0, end: int = ...) -> int: ... def rjust(self, width: int, fillchar: str = ...) -> bytearray: ... def rpartition(self, sep: str) -> Tuple[bytearray, bytearray, bytearray]: ... - def rsplit(self, sep: str = ..., maxsplit: int = ...) -> List[bytearray]: ... + def rsplit(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[bytearray]: ... def rstrip(self, chars: str = ...) -> bytearray: ... - def split(self, sep: str = ..., maxsplit: int = ...) -> List[bytearray]: ... + def split(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[bytearray]: ... def splitlines(self, keepends: bool = ...) -> List[bytearray]: ... def startswith(self, prefix: Union[str, Tuple[str, ...]]) -> bool: ... def strip(self, chars: str = ...) -> bytearray: ... diff --git a/stdlib/2.7/socket.pyi b/stdlib/2.7/socket.pyi index d99a1279a..c7122880f 100644 --- a/stdlib/2.7/socket.pyi +++ b/stdlib/2.7/socket.pyi @@ -278,7 +278,7 @@ class socket: proto = 0 def __init__(self, family: int = ..., type: int = ..., - proto: int = ..., fileno: int = ...) -> None: ... + proto: int = ...) -> None: ... # --- methods --- # second tuple item is an address diff --git a/stdlib/3/socket.pyi b/stdlib/3/socket.pyi index cd2f3d541..8451cfbc2 100644 --- a/stdlib/3/socket.pyi +++ b/stdlib/3/socket.pyi @@ -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, overload +from typing import Any, Tuple, List, Optional, Union, overload # ----- variables and constants ----- @@ -277,7 +277,7 @@ class socket: proto = 0 def __init__(self, family: int = ..., type: int = ..., - proto: int = ..., fileno: int = ...) -> None: ... + proto: int = ..., fileno: Optional[int] = ...) -> None: ... # --- methods --- # second tuple item is an address