chore: fix issues introduced by ruff 0.0.245

This commit is contained in:
bastimeyer 2023-02-11 12:36:59 +01:00 committed by Sebastian Meyer
parent ffca7bdbd8
commit 13915cf86d
1 changed files with 5 additions and 1 deletions

View File

@ -21,6 +21,10 @@ with suppress(AttributeError):
ACCEPTABLE_ERRNO += (errno.WSAECONNABORTED,) # type: ignore[assignment,attr-defined]
def _noop(_):
return None
class _ReadError(BaseException):
pass
@ -105,7 +109,7 @@ class StreamRunner:
) -> None:
read = self.stream.read
write = self.output.write
progress = self.progress.write if self.progress else lambda _: None
progress = self.progress.write if self.progress else _noop
if self.playerpoller:
self.playerpoller.start()