From 48c9b4661b8ce74467b13447227cbdbd29612b9c Mon Sep 17 00:00:00 2001 From: SKairinos Date: Wed, 6 Nov 2024 13:27:43 +0000 Subject: [PATCH] fix types --- codeforlife/tests/model_serializer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codeforlife/tests/model_serializer.py b/codeforlife/tests/model_serializer.py index 8f01541..984652a 100644 --- a/codeforlife/tests/model_serializer.py +++ b/codeforlife/tests/model_serializer.py @@ -14,8 +14,8 @@ from rest_framework.serializers import BaseSerializer, ValidationError from ..serializers import ( + BaseModelListSerializer, BaseModelSerializer, - ModelListSerializer, ModelSerializer, ) from ..types import DataDict @@ -141,7 +141,7 @@ def _assert_many( new_data: t.Optional[t.List[DataDict]], non_model_fields: t.Optional[NonModelFields], get_models: t.Callable[ - [ModelListSerializer[RequestUser, AnyModel], t.List[DataDict]], + [BaseModelListSerializer[t.Any, AnyModel], t.List[DataDict]], t.List[AnyModel], ], *args, @@ -154,7 +154,7 @@ def _assert_many( assert len(new_data) == len(validated_data) kwargs.pop("many", None) # many must be True - serializer: ModelListSerializer[RequestUser, AnyModel] = ( + serializer: BaseModelListSerializer[t.Any, AnyModel] = ( self._init_model_serializer(*args, **kwargs, many=True) )