Skip to content

Commit

Permalink
Add ignore codes for mypy in rich.progress
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Mar 30, 2022
1 parent 7a870e4 commit 5717d8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rich/progress.py
Expand Up @@ -228,12 +228,12 @@ def read(self, size: int = -1) -> bytes:
self.progress.advance(self.task, advance=len(block))
return block

def readinto(self, b: Union[bytearray, memoryview, mmap]): # type: ignore
n = self.handle.readinto(b) # type: ignore
def readinto(self, b: Union[bytearray, memoryview, mmap]): # type: ignore[no-untyped-def, override]
n = self.handle.readinto(b) # type: ignore[attr-defined]
self.progress.advance(self.task, advance=n)
return n

def readline(self, size: int = -1) -> bytes: # type: ignore
def readline(self, size: int = -1) -> bytes: # type: ignore[override]
line = self.handle.readline(size)
self.progress.advance(self.task, advance=len(line))
return line
Expand Down Expand Up @@ -479,7 +479,7 @@ def open(
total=total,
description=description,
)
return _ReadContext(progress, reader) # type: ignore
return _ReadContext(progress, reader) # type: ignore[return-value, type-var]


class ProgressColumn(ABC):
Expand Down

0 comments on commit 5717d8d

Please sign in to comment.