|
1 | 1 | import _compression |
2 | 2 | import sys |
| 3 | +from _bz2 import BZ2Compressor as BZ2Compressor, BZ2Decompressor as BZ2Decompressor |
3 | 4 | from _compression import BaseStream |
4 | 5 | from _typeshed import ReadableBuffer, StrOrBytesPath, WriteableBuffer |
5 | 6 | from collections.abc import Iterable |
6 | | -from typing import IO, Any, Literal, Protocol, SupportsIndex, TextIO, final, overload |
| 7 | +from typing import IO, Any, Literal, Protocol, SupportsIndex, TextIO, overload |
7 | 8 | from typing_extensions import Self, TypeAlias |
8 | 9 |
|
9 | 10 | __all__ = ["BZ2File", "BZ2Compressor", "BZ2Decompressor", "open", "compress", "decompress"] |
@@ -128,19 +129,3 @@ class BZ2File(BaseStream, IO[bytes]): |
128 | 129 | def seek(self, offset: int, whence: int = 0) -> int: ... |
129 | 130 | def write(self, data: ReadableBuffer) -> int: ... |
130 | 131 | def writelines(self, seq: Iterable[ReadableBuffer]) -> None: ... |
131 | | - |
132 | | -@final |
133 | | -class BZ2Compressor: |
134 | | - def __init__(self, compresslevel: int = 9) -> None: ... |
135 | | - def compress(self, data: ReadableBuffer, /) -> bytes: ... |
136 | | - def flush(self) -> bytes: ... |
137 | | - |
138 | | -@final |
139 | | -class BZ2Decompressor: |
140 | | - def decompress(self, data: ReadableBuffer, max_length: int = -1) -> bytes: ... |
141 | | - @property |
142 | | - def eof(self) -> bool: ... |
143 | | - @property |
144 | | - def needs_input(self) -> bool: ... |
145 | | - @property |
146 | | - def unused_data(self) -> bytes: ... |
0 commit comments