Skip to content

Commit 1e4d9c7

Browse files
committed
Add correct optional default start/end parameters to str count, find, index, rfind, rindex.
1 parent c2cdb1b commit 1e4d9c7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stdlib/3/builtins.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,15 @@ class str(Sequence[str]):
221221
def __init__(self, o: bytes, encoding: str = ..., errors: str = 'strict') -> None: ...
222222
def capitalize(self) -> str: ...
223223
def center(self, width: int, fillchar: str = ' ') -> str: ...
224-
def count(self, x: str) -> int: ...
224+
def count(self, x: str, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
225225
def encode(self, encoding: str = 'utf-8', errors: str = 'strict') -> bytes: ...
226226
def endswith(self, suffix: Union[str, Tuple[str, ...]], start: int = None,
227227
end: int = None) -> bool: ...
228228
def expandtabs(self, tabsize: int = 8) -> str: ...
229-
def find(self, sub: str, start: int = 0, end: int = 0) -> int: ...
229+
def find(self, sub: str, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
230230
def format(self, *args: Any, **kwargs: Any) -> str: ...
231231
def format_map(self, map: Mapping[str, Any]) -> str: ...
232-
def index(self, sub: str, start: int = 0, end: int = 0) -> int: ...
232+
def index(self, sub: str, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
233233
def isalnum(self) -> bool: ...
234234
def isalpha(self) -> bool: ...
235235
def isdecimal(self) -> bool: ...
@@ -247,8 +247,8 @@ class str(Sequence[str]):
247247
def lstrip(self, chars: str = None) -> str: ...
248248
def partition(self, sep: str) -> Tuple[str, str, str]: ...
249249
def replace(self, old: str, new: str, count: int = -1) -> str: ...
250-
def rfind(self, sub: str, start: int = 0, end: int = 0) -> int: ...
251-
def rindex(self, sub: str, start: int = 0, end: int = 0) -> int: ...
250+
def rfind(self, sub: str, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
251+
def rindex(self, sub: str, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
252252
def rjust(self, width: int, fillchar: str = ' ') -> str: ...
253253
def rpartition(self, sep: str) -> Tuple[str, str, str]: ...
254254
def rsplit(self, sep: str = None, maxsplit: int = -1) -> List[str]: ...

0 commit comments

Comments
 (0)