diff --git a/stdlib/@tests/stubtest_allowlists/common.txt b/stdlib/@tests/stubtest_allowlists/common.txt index 81b590c54..41905256b 100644 --- a/stdlib/@tests/stubtest_allowlists/common.txt +++ b/stdlib/@tests/stubtest_allowlists/common.txt @@ -68,7 +68,6 @@ xml.sax.expatreader _thread.RLock _threading_local._localimpl.localargs _threading_local._localimpl.locallock -bz2.BZ2File.peek codecs.StreamReader.charbuffertype codecs.StreamReader.seek codecs.StreamWriter.seek diff --git a/stdlib/bz2.pyi b/stdlib/bz2.pyi index ee5587031..2f869f969 100644 --- a/stdlib/bz2.pyi +++ b/stdlib/bz2.pyi @@ -126,6 +126,7 @@ class BZ2File(BaseStream, IO[bytes]): def readline(self, size: SupportsIndex = -1) -> bytes: ... # type: ignore[override] def readinto(self, b: WriteableBuffer) -> int: ... def readlines(self, size: SupportsIndex = -1) -> list[bytes]: ... + def peek(self, n: int = 0) -> bytes: ... def seek(self, offset: int, whence: int = 0) -> int: ... def write(self, data: ReadableBuffer) -> int: ... def writelines(self, seq: Iterable[ReadableBuffer]) -> None: ...