Skip to content

Commit 0956a24

Browse files
scopsrittau
authored andcommitted
bytes/bytearray.startswith fixes (#2696)
1 parent 4d85e53 commit 0956a24

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

stdlib/3/builtins.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,8 @@ class bytes(ByteString):
387387
def rstrip(self, chars: Optional[bytes] = ...) -> bytes: ...
388388
def split(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytes]: ...
389389
def splitlines(self, keepends: bool = ...) -> List[bytes]: ...
390-
def startswith(self, prefix: Union[bytes, Tuple[bytes, ...]]) -> bool: ...
390+
def startswith(self, prefix: Union[bytes, Tuple[bytes, ...]], start: Optional[int] = ...,
391+
end: Optional[int] = ...) -> bool: ...
391392
def strip(self, chars: Optional[bytes] = ...) -> bytes: ...
392393
def swapcase(self) -> bytes: ...
393394
def title(self) -> bytes: ...
@@ -466,7 +467,8 @@ class bytearray(MutableSequence[int], ByteString):
466467
def rstrip(self, chars: Optional[bytes] = ...) -> bytearray: ...
467468
def split(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytearray]: ...
468469
def splitlines(self, keepends: bool = ...) -> List[bytearray]: ...
469-
def startswith(self, prefix: bytes) -> bool: ...
470+
def startswith(self, prefix: Union[bytes, Tuple[bytes, ...]], start: Optional[int] = ...,
471+
end: Optional[int] = ...) -> bool: ...
470472
def strip(self, chars: Optional[bytes] = ...) -> bytearray: ...
471473
def swapcase(self) -> bytearray: ...
472474
def title(self) -> bytearray: ...

0 commit comments

Comments
 (0)