From f18e183ab09c439462d3ddf893f4e490e3d9ab70 Mon Sep 17 00:00:00 2001 From: Matthias Bisping Date: Mon, 28 Mar 2022 18:54:28 +0200 Subject: [PATCH] added type hint --- test/unit_tests/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit_tests/conftest.py b/test/unit_tests/conftest.py index ebca268..aa173cf 100644 --- a/test/unit_tests/conftest.py +++ b/test/unit_tests/conftest.py @@ -194,10 +194,10 @@ def pdf_stream(pdf: fpdf.fpdf.FPDF): return pdf.output(dest="S").encode("latin1") -def add_image_to_last_page(pdf, image_metadata_pair): +def add_image_to_last_page(pdf: fpdf.fpdf.FPDF, image_metadata_pair): image, metadata = image_metadata_pair x, y, w, h = itemgetter("x1", "y1", "width", "height")(metadata) with tempfile.NamedTemporaryFile(suffix=".png") as temp_image: image.save(temp_image.name) - pdf.image(temp_image.name, x=x, y=y, w=w, h=h) + pdf.image(temp_image.name, x=x, y=y, w=w, h=h, type="png")