mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-02-28 06:16:23 +00:00
Handles the linter updates now
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user