Rename PDFContext->PdfContext

This commit is contained in:
James R. Barlow
2020-05-02 04:32:46 -07:00
parent e02f6c1e97
commit 5dbc080fa0
4 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ from functools import partial
from ocrmypdf._plugin_manager import get_plugin_manager
class PDFContext:
class PdfContext:
"""Holds our context for a particular run of the pipeline"""
def __init__(self, options, work_folder, origin, pdfinfo, plugin_manager):
+2 -2
View File
@@ -32,7 +32,7 @@ import pluggy
from ocrmypdf import pluginspec
from ocrmypdf._concurrent import exec_progress_pool
from ocrmypdf._graft import OcrGrafter
from ocrmypdf._jobcontext import PDFContext, cleanup_working_files
from ocrmypdf._jobcontext import PdfContext, cleanup_working_files
from ocrmypdf._logging import PageNumberFilter
from ocrmypdf._pipeline import (
convert_to_pdfa,
@@ -330,7 +330,7 @@ def run_pipeline(options, *, plugin_manager, api=False):
max_workers=options.jobs if not options.use_threads else 1, # To help debug
)
context = PDFContext(options, work_folder, origin_pdf, pdfinfo, plugin_manager)
context = PdfContext(options, work_folder, origin_pdf, pdfinfo, plugin_manager)
# Validate options are okay for this pdf
validate_pdfinfo_options(context)
+2 -2
View File
@@ -29,7 +29,7 @@ from PIL import Image
from tqdm import tqdm
from . import leptonica
from ._jobcontext import PDFContext
from ._jobcontext import PdfContext
from .exceptions import OutputFileAccessError
from .exec import jbig2enc, pngquant
from .helpers import safe_symlink
@@ -582,7 +582,7 @@ def main(infile, outfile, level, jobs=1):
)
with TemporaryDirectory() as td:
context = PDFContext(options, td, infile, None, None)
context = PdfContext(options, td, infile, None, None)
tmpout = Path(td) / 'out.pdf'
optimize(
infile,