diff --git a/src/documents/management/commands/document_retagger.py b/src/documents/management/commands/document_retagger.py index d14f6b8c6..251253cf1 100644 --- a/src/documents/management/commands/document_retagger.py +++ b/src/documents/management/commands/document_retagger.py @@ -5,7 +5,6 @@ from dataclasses import dataclass from dataclasses import field from typing import TYPE_CHECKING -from rich.console import RenderableType from rich.table import Table from rich.text import Text @@ -18,6 +17,8 @@ from documents.signals.handlers import set_storage_path from documents.signals.handlers import set_tags if TYPE_CHECKING: + from rich.console import RenderableType + from documents.models import Correspondent from documents.models import DocumentType from documents.models import StoragePath diff --git a/src/documents/tests/test_management_retagger.py b/src/documents/tests/test_management_retagger.py index 2c5f0bd72..c2e94e1cc 100644 --- a/src/documents/tests/test_management_retagger.py +++ b/src/documents/tests/test_management_retagger.py @@ -100,8 +100,8 @@ def document_types(db) -> DocumentTypeTuple: @pytest.fixture() def documents(storage_paths: StoragePathTuple, tags: TagTuple) -> DocumentTuple: """Four documents with varied content used across most retagger tests.""" - sp1, sp2, sp3 = storage_paths - tag_first, tag_second, tag_inbox, tag_no_match, tag_auto = tags + _, _, sp3 = storage_paths + _, _, tag_inbox, tag_no_match, tag_auto = tags d1 = DocumentFactory(checksum="A", title="A", content="first document") d2 = DocumentFactory(checksum="B", title="B", content="second document") @@ -155,7 +155,7 @@ class TestRetaggerTags(DirectoriesMixin): tags: TagTuple, ) -> None: d1, *_ = documents - tag_first, tag_second, tag_inbox, tag_no_match, tag_auto = tags + tag_first, tag_second, tag_inbox, tag_no_match, _ = tags d1.tags.add(tag_second) call_command("document_retagger", "--tags", "--overwrite")