Skip to content
Snippets Groups Projects
Commit 717f6a57 authored by Nicolas Dandrimont's avatar Nicolas Dandrimont
Browse files

DecompressorProtocol: unused_data is a read-only property

parent 2bc3b0b6
No related branches found
No related tags found
3 merge requests!206Draft: Migration to psycopg3,!201winery: try harder to record shards as mapped,!197Run the common objstorage test suite on winery
Pipeline #13406 passed
......@@ -99,15 +99,16 @@ class _CompressorProtocol(Protocol):
class _DecompressorProtocol(Protocol):
def decompress(self, data: bytes) -> bytes: ...
unused_data: bytes
@property
def unused_data(self) -> bytes: ...
decompressors: Dict[str, Callable[[], _DecompressorProtocol]] = {
"bz2": bz2.BZ2Decompressor, # type: ignore
"lzma": lzma.LZMADecompressor, # type: ignore
"bz2": bz2.BZ2Decompressor,
"lzma": lzma.LZMADecompressor,
"gzip": lambda: zlib.decompressobj(wbits=31),
"zlib": zlib.decompressobj,
"none": NullDecompressor, # type: ignore
"none": NullDecompressor,
}
compressors: Dict[str, Callable[[], _CompressorProtocol]] = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment