Skip to content

Commit 739711e

Browse files
lzma: Takes ReadableBuffer, not bytes (#8996)
1 parent 86ada9e commit 739711e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

stdlib/lzma.pyi

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ PRESET_EXTREME: int # v big number
8383
@final
8484
class LZMADecompressor:
8585
def __init__(self, format: int | None = ..., memlimit: int | None = ..., filters: _FilterChain | None = ...) -> None: ...
86-
def decompress(self, data: bytes, max_length: int = ...) -> bytes: ...
86+
def decompress(self, data: ReadableBuffer, max_length: int = ...) -> bytes: ...
8787
@property
8888
def check(self) -> int: ...
8989
@property
@@ -99,7 +99,7 @@ class LZMACompressor:
9999
def __init__(
100100
self, format: int | None = ..., check: int = ..., preset: int | None = ..., filters: _FilterChain | None = ...
101101
) -> None: ...
102-
def compress(self, __data: bytes) -> bytes: ...
102+
def compress(self, __data: ReadableBuffer) -> bytes: ...
103103
def flush(self) -> bytes: ...
104104

105105
class LZMAError(Exception): ...
@@ -189,7 +189,9 @@ def open(
189189
newline: str | None = ...,
190190
) -> LZMAFile | TextIO: ...
191191
def compress(
192-
data: bytes, format: int = ..., check: int = ..., preset: int | None = ..., filters: _FilterChain | None = ...
192+
data: ReadableBuffer, format: int = ..., check: int = ..., preset: int | None = ..., filters: _FilterChain | None = ...
193+
) -> bytes: ...
194+
def decompress(
195+
data: ReadableBuffer, format: int = ..., memlimit: int | None = ..., filters: _FilterChain | None = ...
193196
) -> bytes: ...
194-
def decompress(data: bytes, format: int = ..., memlimit: int | None = ..., filters: _FilterChain | None = ...) -> bytes: ...
195197
def is_check_supported(__check_id: int) -> bool: ...

0 commit comments

Comments
 (0)