ruff autofixes (mostly typing.* -> collections.abc.*)

This commit is contained in:
James R. Barlow
2023-10-01 00:02:53 -07:00
parent e9419d2c40
commit 113a6b45bd
21 changed files with 35 additions and 26 deletions
+3 -2
View File
@@ -12,9 +12,10 @@ import queue
import signal
import sys
import threading
from collections.abc import Iterable
from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor, as_completed
from contextlib import suppress
from typing import Callable, Iterable, Type, Union
from typing import Callable, Union
from rich.console import Console as RichConsole
@@ -23,7 +24,7 @@ from ocrmypdf._logging import RichLoggingHandler, RichTqdmProgressAdapter
from ocrmypdf.exceptions import InputFileError
from ocrmypdf.helpers import remove_all_log_handlers
FuturesExecutorClass = Union[Type[ThreadPoolExecutor], Type[ProcessPoolExecutor]]
FuturesExecutorClass = Union[type[ThreadPoolExecutor], type[ProcessPoolExecutor]]
Queue = Union[multiprocessing.Queue, queue.Queue]
UserInit = Callable[[], None]
WorkerInit = Callable[[Queue, UserInit, int], None]
+1 -1
View File
@@ -6,8 +6,8 @@ from __future__ import annotations
import argparse
import logging
from collections.abc import Sequence
from pathlib import Path
from typing import Sequence
from ocrmypdf import Executor, PdfContext, hookimpl
from ocrmypdf._exec import jbig2enc, pngquant