From bd865b5301b8b3df71aefe14401704746770eb20 Mon Sep 17 00:00:00 2001 From: Andy Galasso Date: Sun, 22 Sep 2024 10:07:55 -0400 Subject: [PATCH] fix: a few ModelSerializer members missing type[] (#51) the members are types and not instances --- rest_framework-stubs/serializers.pyi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rest_framework-stubs/serializers.pyi b/rest_framework-stubs/serializers.pyi index e0afe36ee..5b9b03f36 100644 --- a/rest_framework-stubs/serializers.pyi +++ b/rest_framework-stubs/serializers.pyi @@ -183,11 +183,11 @@ class ListSerializer(BaseSerializer): def raise_errors_on_nested_writes(method_name: str, serializer: BaseSerializer, validated_data: Any) -> NoReturn: ... class ModelSerializer(Serializer, BaseSerializer): - serializer_field_mapping: dict[type[models.Field[Any, Any]], Field[Any, Any, Any, Any]] = ... - serializer_related_field: RelatedField = ... - serializer_related_to_field: RelatedField = ... - serializer_url_field: RelatedField = ... - serializer_choice_field: Field[Any, Any, Any, Any] = ... + serializer_field_mapping: dict[type[models.Field[Any, Any]], type[Field[Any, Any, Any, Any]]] = ... + serializer_related_field: type[RelatedField] = ... + serializer_related_to_field: type[RelatedField] = ... + serializer_url_field: type[RelatedField] = ... + serializer_choice_field: type[Field[Any, Any, Any, Any]] = ... url_field_name: str | None = ... instance: Any