mirror of
https://github.com/ocrmypdf/OCRmyPDF.git
synced 2026-05-07 22:24:43 -04:00
Typing adjustments
This commit is contained in:
@@ -86,8 +86,8 @@ test =
|
||||
pytest-cov>=2.11.1
|
||||
pytest-xdist>=2.2.0
|
||||
python-xmp-toolkit==2.0.1 # also requires apt-get install libexempi3
|
||||
types-humanfriendly
|
||||
types-Pillow
|
||||
types-humanfriendly
|
||||
watcher =
|
||||
watchdog>=1.0.2
|
||||
webservice =
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user