Delinting: unused args

This commit is contained in:
James R. Barlow
2021-04-07 02:18:08 -07:00
parent e788dde607
commit 2a09a668f6
2 changed files with 7 additions and 4 deletions
+5
View File
@@ -65,6 +65,9 @@ def jpg_name(root: Path, xref: Xref) -> Path:
def extract_image_filter(
pike: Pdf, root: Path, image: Object, xref: Xref
) -> Optional[Tuple[PdfImage, Tuple[Name, Object]]]:
del pike # unused args
del root
if image.Subtype != Name.Image:
return None
if image.Length < 100:
@@ -103,6 +106,8 @@ def extract_image_filter(
def extract_image_jbig2(
*, pike: pikepdf.Pdf, root: Path, image: Object, xref: Xref, options
) -> Optional[XrefExt]:
del options # unused arg
result = extract_image_filter(pike, root, image, xref)
if result is None:
return None
+2 -4
View File
@@ -30,8 +30,7 @@ def test_stdin(ocrmypdf_exec, resources, outpdf):
'--plugin',
'tests/plugins/tesseract_noop.py',
]
p = run(p_args, stdout=PIPE, stderr=PIPE, stdin=input_stream)
assert p.returncode == ExitCode.ok
run(p_args, stdout=PIPE, stderr=PIPE, stdin=input_stream, check=True)
def test_stdout(ocrmypdf_exec, resources, outpdf):
@@ -49,8 +48,7 @@ def test_stdout(ocrmypdf_exec, resources, outpdf):
'--plugin',
'tests/plugins/tesseract_noop.py',
]
p = run(p_args, stdout=output_stream, stderr=PIPE, stdin=DEVNULL)
assert p.returncode == ExitCode.ok
run(p_args, stdout=output_stream, stderr=PIPE, stdin=DEVNULL, check=True)
assert check_pdf(output_file)