mirror of
https://github.com/ocrmypdf/OCRmyPDF.git
synced 2026-05-16 18:45:51 -04:00
Remove next major release deprecations
This commit is contained in:
@@ -30,8 +30,6 @@ Queue = Union[multiprocessing.Queue, queue.Queue]
|
||||
UserInit = Callable[[], None]
|
||||
WorkerInit = Callable[[Queue, UserInit, int], None]
|
||||
|
||||
RichTqdmProgressAdapter = RichProgressBar # Deprecated shim; remove in OCRmyPDF 16
|
||||
|
||||
|
||||
def log_listener(q: Queue):
|
||||
"""Listen to the worker processes and forward the messages to logging.
|
||||
|
||||
@@ -71,15 +71,9 @@ def jpg_name(root: Path, xref: Xref) -> Path:
|
||||
|
||||
|
||||
def extract_image_filter(
|
||||
image: Stream, xref: Xref, *args
|
||||
image: Stream, xref: Xref
|
||||
) -> tuple[PdfImage, tuple[Name, Object]] | None:
|
||||
"""Determine if an image is extractable."""
|
||||
if isinstance(image, Pdf):
|
||||
# Support deprecated old function signature
|
||||
# TODO Remove for v16 and drop *args from current function signature
|
||||
image, xref = args[0], args[1]
|
||||
warn("extract_image_filter: pdf, root parameters ignored", DeprecationWarning)
|
||||
|
||||
if image.Subtype != Name.Image:
|
||||
return None
|
||||
if image.Length < 100:
|
||||
|
||||
Reference in New Issue
Block a user