Additional ruff fixes

This commit is contained in:
James R. Barlow
2023-04-14 01:25:16 -07:00
parent 1d0e4e7c9f
commit 4924b11b6b
21 changed files with 113 additions and 22 deletions
@@ -16,6 +16,7 @@ log = logging.getLogger(__name__)
@hookimpl
def check_options(options):
"""Check that the options are valid for this plugin."""
check_external_program(
program='gs',
package='ghostscript',
@@ -45,6 +46,7 @@ def rasterize_pdf_page(
rotation,
filter_vector,
):
"""Rasterize a single page of a PDF file using Ghostscript."""
ghostscript.rasterize_pdf(
input_file,
output_file,
@@ -68,6 +70,7 @@ def generate_pdfa(
pdfa_part,
progressbar_class,
):
"""Generate a PDF/A from the list of PDF pages and PDF/A metadata."""
ghostscript.generate_pdfa(
pdf_pages=[*pdf_pages, pdfmark],
output_file=output_file,