From c3312e6b2f30db23a3f3221323fd0ef0f46f5470 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Tue, 5 Nov 2024 11:48:26 +0000 Subject: [PATCH] fix: imports --- codeforlife/serializers/__init__.py | 4 ++-- codeforlife/views/api.py | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/codeforlife/serializers/__init__.py b/codeforlife/serializers/__init__.py index 30c7968d..44782491 100644 --- a/codeforlife/serializers/__init__.py +++ b/codeforlife/serializers/__init__.py @@ -3,5 +3,5 @@ Created on 20/01/2024 at 11:19:12(+00:00). """ -from .base import * -from .model import * +from .base import BaseSerializer +from .model import ModelListSerializer, ModelSerializer diff --git a/codeforlife/views/api.py b/codeforlife/views/api.py index af7ad2db..07c0d459 100644 --- a/codeforlife/views/api.py +++ b/codeforlife/views/api.py @@ -8,7 +8,13 @@ from rest_framework.views import APIView as _APIView from ..request import Request -from ..user.models import AnyUser as RequestUser + +if t.TYPE_CHECKING: + from ..user.models import User + + RequestUser = t.TypeVar("RequestUser", bound=User) +else: + RequestUser = t.TypeVar("RequestUser") # pylint: disable-next=missing-class-docstring