Make mypy 1.16 happy

This commit is contained in:
Kovid Goyal
2025-05-30 10:01:15 +05:30
parent 27fdfe6480
commit 62580c855b
10 changed files with 30 additions and 28 deletions

View File

@@ -40,8 +40,8 @@ def set_paths(cwd: str = '', home: str = '') -> Generator[None, None, None]:
class IdentityCompressor:
def compress(self, data: bytes) -> bytes:
return data
def compress(self, data: bytes | memoryview) -> bytes:
return bytes(data)
def flush(self) -> bytes:
return b''
@@ -53,7 +53,7 @@ class ZlibCompressor:
import zlib
self.c = zlib.compressobj()
def compress(self, data: bytes) -> bytes:
def compress(self, data: bytes | memoryview) -> bytes:
return self.c.compress(data)
def flush(self) -> bytes: