Fix unused imports and other trivia
This commit is contained in:
@@ -13,7 +13,6 @@ from pathlib import Path
|
||||
from subprocess import PIPE, STDOUT, CalledProcessError, TimeoutExpired
|
||||
|
||||
from packaging.version import Version
|
||||
from PIL import Image
|
||||
|
||||
from ocrmypdf.exceptions import (
|
||||
MissingDependencyError,
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
from argparse import Namespace
|
||||
from collections.abc import Iterator
|
||||
from copy import copy
|
||||
|
||||
@@ -10,7 +10,6 @@ from __future__ import annotations
|
||||
import argparse
|
||||
import logging
|
||||
import logging.handlers
|
||||
import threading
|
||||
from collections.abc import Sequence
|
||||
from functools import partial
|
||||
from pathlib import Path
|
||||
|
||||
@@ -11,7 +11,6 @@ import argparse
|
||||
import logging
|
||||
import logging.handlers
|
||||
import shutil
|
||||
import threading
|
||||
from functools import partial
|
||||
|
||||
import PIL
|
||||
|
||||
@@ -319,7 +319,7 @@ def remove_all_log_handlers(logger: logging.Logger) -> None:
|
||||
|
||||
|
||||
def pikepdf_enable_mmap() -> None:
|
||||
"""Enable pikepdf mmap."""
|
||||
"""Enable pikepdf memory mapping."""
|
||||
try:
|
||||
pikepdf._core.set_access_default_mmap(True)
|
||||
log.debug(
|
||||
|
||||
@@ -12,6 +12,7 @@ from typing import NamedTuple
|
||||
|
||||
|
||||
class ISOCodeData(NamedTuple):
|
||||
"""Data for a single ISO 639 code."""
|
||||
alt: str
|
||||
alpha_2: str
|
||||
english: str
|
||||
@@ -167,7 +168,8 @@ ISO_639_3 = {
|
||||
'chu': ISOCodeData(
|
||||
'',
|
||||
'cu',
|
||||
'Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic',
|
||||
('Church Slavic; Old Slavonic; Church Slavonic;'
|
||||
' Old Bulgarian; Old Church Slavonic'),
|
||||
"slavon d'église; vieux slave; slavon liturgique; vieux bulgare",
|
||||
),
|
||||
'chv': ISOCodeData('', 'cv', 'Chuvash', 'tchouvache'),
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
||||
import pytest
|
||||
|
||||
import ocrmypdf
|
||||
|
||||
Reference in New Issue
Block a user