Typing adjustments

This commit is contained in:
James R. Barlow
2022-07-23 00:07:50 -07:00
parent 014d0302f2
commit 9c8ddd853d
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -494,7 +494,7 @@ def preprocess_deskew(input_file: Path, page_context: PageContext):
deskewed = im.rotate(
deskew_angle_degrees,
resample=BICUBIC,
fillcolor=ImageColor.getcolor('white', mode=im.mode),
fillcolor=ImageColor.getcolor('white', mode=im.mode), # type: ignore
)
deskewed.save(output_file, dpi=dpi)
+3 -1
View File
@@ -20,7 +20,9 @@ from typing import Any, Callable, Iterable, Iterator, Set, Tuple, TypeVar
try:
import winreg
except ModuleNotFoundError as _notfound_ex:
raise ModuleNotFoundError("This module is for Windows only") from _notfound_ex
from unittest import mock
winreg = mock.MagicMock()
log = logging.getLogger(__name__)