Chore: Reduce imports for a slight memory improvement (#9217)

This commit is contained in:
Trenton H
2025-02-24 15:06:14 -08:00
committed by GitHub
parent 3104417076
commit 827fcba277
12 changed files with 71 additions and 26 deletions

View File

@@ -1,9 +1,11 @@
from __future__ import annotations
import functools
import inspect
import json
import operator
from collections.abc import Callable
from contextlib import contextmanager
from typing import TYPE_CHECKING
from django.contrib.contenttypes.models import ContentType
from django.db.models import Case
@@ -39,6 +41,9 @@ from documents.models import ShareLink
from documents.models import StoragePath
from documents.models import Tag
if TYPE_CHECKING:
from collections.abc import Callable
CHAR_KWARGS = ["istartswith", "iendswith", "icontains", "iexact"]
ID_KWARGS = ["in", "exact"]
INT_KWARGS = ["exact", "gt", "gte", "lt", "lte", "isnull"]