diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index e8cc5aee1..9514683e1 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -301,14 +301,14 @@ class str(basestring, Sequence[str]): def __init__(self, object: object='') -> None: ... def capitalize(self) -> str: ... def center(self, width: int, fillchar: str = ...) -> str: ... - def count(self, x: unicode) -> int: ... + def count(self, x: unicode, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def decode(self, encoding: unicode = ..., errors: unicode = ...) -> unicode: ... def encode(self, encoding: unicode = ..., errors: unicode = ...) -> str: ... def endswith(self, suffix: Union[unicode, Tuple[unicode, ...]]) -> bool: ... def expandtabs(self, tabsize: int = 8) -> str: ... - def find(self, sub: unicode, start: int = 0, end: int = 0) -> int: ... + def find(self, sub: unicode, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def format(self, *args: Any, **kwargs: Any) -> str: ... - def index(self, sub: unicode, start: int = 0, end: int = 0) -> int: ... + def index(self, sub: unicode, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def isalnum(self) -> bool: ... def isalpha(self) -> bool: ... def isdigit(self) -> bool: ... @@ -330,8 +330,8 @@ class str(basestring, Sequence[str]): @overload def partition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ... def replace(self, old: AnyStr, new: AnyStr, count: int = ...) -> AnyStr: ... - def rfind(self, sub: unicode, start: int = 0, end: int = 0) -> int: ... - def rindex(self, sub: unicode, start: int = 0, end: int = 0) -> int: ... + def rfind(self, sub: unicode, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... + def rindex(self, sub: unicode, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def rjust(self, width: int, fillchar: str = ...) -> str: ... @overload def rpartition(self, sep: bytearray) -> Tuple[str, bytearray, str]: ... diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 2b0f40249..89d43a2b3 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -221,15 +221,15 @@ class str(Sequence[str]): def __init__(self, o: bytes, encoding: str = ..., errors: str = 'strict') -> None: ... def capitalize(self) -> str: ... def center(self, width: int, fillchar: str = ' ') -> str: ... - def count(self, x: str) -> int: ... + def count(self, x: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def encode(self, encoding: str = 'utf-8', errors: str = 'strict') -> bytes: ... def endswith(self, suffix: Union[str, Tuple[str, ...]], start: int = None, end: int = None) -> bool: ... def expandtabs(self, tabsize: int = 8) -> str: ... - def find(self, sub: str, start: int = 0, end: int = 0) -> int: ... + def find(self, sub: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def format(self, *args: Any, **kwargs: Any) -> str: ... def format_map(self, map: Mapping[str, Any]) -> str: ... - def index(self, sub: str, start: int = 0, end: int = 0) -> int: ... + def index(self, sub: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def isalnum(self) -> bool: ... def isalpha(self) -> bool: ... def isdecimal(self) -> bool: ... @@ -247,8 +247,8 @@ class str(Sequence[str]): def lstrip(self, chars: str = None) -> str: ... def partition(self, sep: str) -> Tuple[str, str, str]: ... def replace(self, old: str, new: str, count: int = -1) -> str: ... - def rfind(self, sub: str, start: int = 0, end: int = 0) -> int: ... - def rindex(self, sub: str, start: int = 0, end: int = 0) -> int: ... + def rfind(self, sub: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... + def rindex(self, sub: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ... def rjust(self, width: int, fillchar: str = ' ') -> str: ... def rpartition(self, sep: str) -> Tuple[str, str, str]: ... def rsplit(self, sep: str = None, maxsplit: int = -1) -> List[str]: ...