Fix mypy errors

This commit is contained in:
James R. Barlow
2023-04-14 13:49:14 -07:00
parent 37d5c086bb
commit 10f4c48e0b
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -900,11 +900,11 @@ def copy_final(
log.debug('%s -> %s', input_file, output_file)
with input_file.open('rb') as input_stream:
if output_file == '-':
copyfileobj(input_stream, sys.stdout.buffer)
copyfileobj(input_stream, sys.stdout.buffer) # type: ignore[misc]
sys.stdout.flush()
elif hasattr(output_file, 'writable'):
output_stream = cast(BinaryIO, output_file)
copyfileobj(input_stream, output_stream)
copyfileobj(input_stream, output_stream) # type: ignore[misc]
with suppress(AttributeError):
output_stream.flush()
else:
+1 -1
View File
@@ -28,7 +28,7 @@ if TYPE_CHECKING:
hookspec = pluggy.HookspecMarker('ocrmypdf')
# pylint: disable=unused-argument
# mypy:
# mypy: disable-error-code=empty-body
@hookspec(firstresult=True)