Make mypy happy

This commit is contained in:
Kovid Goyal
2024-12-21 08:06:29 +05:30
parent 3b89c686e6
commit 3bee1857f7
8 changed files with 19 additions and 24 deletions

View File

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