do_get_pdfinfo: typing

This commit is contained in:
James R. Barlow
2024-10-27 17:23:20 -07:00
parent 6f755321b8
commit 5e478a7774
+5 -2
View File
@@ -57,6 +57,7 @@ from ocrmypdf.helpers import (
samefile,
)
from ocrmypdf.pdfa import file_claims_pdfa
from ocrmypdf.pdfinfo import PdfInfo
log = logging.getLogger(__name__)
tls = threading.local()
@@ -316,9 +317,11 @@ def setup_pipeline(
return executor
def do_get_pdfinfo(pdf, executor, options):
def do_get_pdfinfo(
pdf_path: Path, executor: Executor, options: argparse.Namespace
) -> PdfInfo:
return get_pdfinfo(
pdf,
pdf_path,
executor=executor,
detailed_analysis=options.redo_ocr,
progbar=options.progress_bar,