save_temporary_file_as_pdf: fix method

This commit is contained in:
Richard Kubíček
2025-02-28 18:36:24 +01:00
parent 7b5d787ab8
commit e21b7332d0

View File

@@ -1,10 +1,7 @@
import tempfile
from typing import IO
def save_temporary_file_as_pdf( def save_temporary_file_as_pdf(
temp_file: IO[bytes], output_path: str = "output.pdf" input_data: bytes, output_path: str = "output.pdf"
) -> None: ) -> None:
with open(output_path, "wb") as f: with open(output_path, "wb") as f:
f.write(temp_file.read()) f.write(input_data)
temp_file.close()