Fix typing issues pointed out by updated mypy

This commit is contained in:
Kovid Goyal
2020-10-12 23:03:07 +05:30
parent 91a714947c
commit efca2658ea
5 changed files with 20 additions and 13 deletions

View File

@@ -137,7 +137,7 @@ class ReadFileWithProgressReporting(io.FileIO): # {{{
def __len__(self) -> int:
return self._total
def read(self, size: int = -1) -> Optional[bytes]:
def read(self, size: int = -1) -> bytes:
data = io.FileIO.read(self, size)
if data:
self.report_progress(len(data))