From cb6c1939e90866e51fd38d6e7f83a1d554781c6c Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Fri, 27 Aug 2021 02:18:54 -0700 Subject: [PATCH] typing: fix runtime issues --- src/ocrmypdf/pluginspec.py | 2 +- tests/test_page_numbers.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ocrmypdf/pluginspec.py b/src/ocrmypdf/pluginspec.py index 1078eeaf..8d485bf1 100644 --- a/src/ocrmypdf/pluginspec.py +++ b/src/ocrmypdf/pluginspec.py @@ -197,7 +197,7 @@ def rasterize_pdf_page( @hookspec(firstresult=True) -def filter_ocr_image(page: 'PageContext', image: Image.Image) -> Image.Image: +def filter_ocr_image(page: 'PageContext', image: 'Image.Image') -> 'Image.Image': """Called to filter the image before it is sent to OCR. This is the image that OCR sees, not what the user sees when they view the diff --git a/tests/test_page_numbers.py b/tests/test_page_numbers.py index 71f06a0d..d89a3bea 100644 --- a/tests/test_page_numbers.py +++ b/tests/test_page_numbers.py @@ -50,10 +50,6 @@ def test_nonmonotonic_warning(caplog): assert 'out of order' in caplog.text -def test_list_range(): - assert _pages_from_ranges([0, 1, 2]) == {0, 1, 2} - - def test_limited_pages(resources, outpdf): multi = resources / 'multipage.pdf' ocrmypdf.ocr(