mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 09:48:09 +02:00
Make mypy 1.16 happy
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user