From 5950f22e87cc51cd021a7617533fe0407937177f Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Mon, 9 Feb 2026 16:32:39 -0800 Subject: [PATCH] Typing --- src/documents/management/commands/document_importer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/documents/management/commands/document_importer.py b/src/documents/management/commands/document_importer.py index 39168931e..30fe6a6bd 100644 --- a/src/documents/management/commands/document_importer.py +++ b/src/documents/management/commands/document_importer.py @@ -5,6 +5,7 @@ import tempfile from collections.abc import Generator from contextlib import contextmanager from pathlib import Path +from typing import TYPE_CHECKING from zipfile import ZipFile from zipfile import is_zipfile @@ -425,6 +426,8 @@ class Command(CryptMixin, BaseCommand): ) if archive_path: + if TYPE_CHECKING: + assert document.archive_path is not None create_source_path_directory(document.archive_path) # TODO: this assumes that the export is valid and # archive_filename is present on all documents with