type checking

This commit is contained in:
shamoon
2026-02-10 20:46:33 -08:00
parent 640025f2a9
commit 8b663393c2
2 changed files with 11 additions and 0 deletions

View File

@@ -102,6 +102,11 @@ class ConsumerStatusShortMessage(str, Enum):
class ConsumerPluginMixin:
if TYPE_CHECKING:
from logging import LoggerAdapter
log: "LoggerAdapter"
def __init__(
self,
input_doc: ConsumableDocument,

View File

@@ -1,5 +1,6 @@
import datetime
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Final
import pathvalidate
@@ -156,6 +157,11 @@ class StoragePath(MatchingModel):
class Document(SoftDeleteModel, ModelWithOwner):
if TYPE_CHECKING:
from django.db.models.query import QuerySet
versions: "QuerySet[Document]"
correspondent = models.ForeignKey(
Correspondent,
blank=True,