From 2d81d2c2b7e078e4a3a7ba2ed4df63a2495a27ed Mon Sep 17 00:00:00 2001 From: Petter Friberg Date: Mon, 18 Sep 2023 08:15:03 +0200 Subject: [PATCH] Use `functools.cached_property` in favor of Django's in mypy plugin --- mypy_django_plugin/django/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy_django_plugin/django/context.py b/mypy_django_plugin/django/context.py index d0c97a05a..18c8834c8 100644 --- a/mypy_django_plugin/django/context.py +++ b/mypy_django_plugin/django/context.py @@ -2,6 +2,7 @@ import sys from collections import defaultdict from contextlib import contextmanager +from functools import cached_property from typing import TYPE_CHECKING, Any, Dict, Iterable, Iterator, Literal, Optional, Sequence, Set, Tuple, Type, Union from django.core.exceptions import FieldDoesNotExist, FieldError @@ -13,7 +14,6 @@ from django.db.models.fields.reverse_related import ForeignObjectRel from django.db.models.lookups import Exact from django.db.models.sql.query import Query -from django.utils.functional import cached_property from mypy.checker import TypeChecker from mypy.nodes import TypeInfo from mypy.plugin import MethodContext