et tu, mypy?

This commit is contained in:
shamoon
2026-02-10 21:52:13 -08:00
parent 5a0a8a58b3
commit b1f2606022
8 changed files with 79 additions and 47 deletions

View File

@@ -811,17 +811,17 @@ def edit_pdf(
if delete_original and len(pdf_docs) == 1:
overrides.asn = root_doc.archive_serial_number
for idx, pdf in enumerate(pdf_docs, start=1):
filepath: Path = (
version_filepath: Path = (
Path(tempfile.mkdtemp(dir=settings.SCRATCH_DIR))
/ f"{root_doc.id}_edit_{idx}.pdf"
)
pdf.remove_unreferenced_resources()
pdf.save(filepath)
pdf.save(version_filepath)
consume_tasks.append(
consume_file.s(
ConsumableDocument(
source=DocumentSource.ConsumeFolder,
original_file=filepath,
original_file=version_filepath,
),
overrides,
),