Skip to content

Commit 10d8cca

Browse files
authored
Use functools.cached_property in favor of Django's in mypy plugin (#1721)
1 parent 395f43d commit 10d8cca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy_django_plugin/django/context.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import sys
33
from collections import defaultdict
44
from contextlib import contextmanager
5+
from functools import cached_property
56
from typing import TYPE_CHECKING, Any, Dict, Iterable, Iterator, Literal, Optional, Sequence, Set, Tuple, Type, Union
67

78
from django.core.exceptions import FieldDoesNotExist, FieldError
@@ -13,7 +14,6 @@
1314
from django.db.models.fields.reverse_related import ForeignObjectRel
1415
from django.db.models.lookups import Exact
1516
from django.db.models.sql.query import Query
16-
from django.utils.functional import cached_property
1717
from mypy.checker import TypeChecker
1818
from mypy.nodes import TypeInfo
1919
from mypy.plugin import MethodContext

0 commit comments

Comments
 (0)