Skip to content

Commit 013fd70

Browse files
committed
chore(handlers/gzip): fix reportIncompatibleMethodOverride lints
This check is currently turned off in our `basic` `typeCheckingMode` profile, but is enabled in the `standard` profile. Things done here: - instead of incompatible overriding `read`, added a new `read_all` method, to better express the functionality of that method Error: unblob/handlers/compression/_gzip_reader.py unblob/handlers/compression/_gzip_reader.py:18:9 - error: Method "read" overrides class "DecompressReader" in an incompatible manner   Positional parameter count mismatch; base method has 2, but override has 1   Parameter 2 mismatch: base parameter "size" is keyword parameter, override parameter is position-only (reportIncompatibleMethodOverride)
1 parent 6981501 commit 013fd70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

unblob/handlers/compression/_gzip_reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def _add_read_data(self, data):
1515
self._crc = zlib.crc32(data, self._crc)
1616
self._stream_size = self._stream_size + len(data)
1717

18-
def read(self):
18+
def read_all(self):
1919
uncompress = b""
2020

2121
while True:
@@ -39,7 +39,7 @@ def read(self):
3939

4040
def read_until_eof(self):
4141
while not self._decompressor.eof:
42-
self.read()
42+
self.read_all()
4343

4444
@property
4545
def unused_data(self):

0 commit comments

Comments
 (0)