From e506537d6555d692c5c35830036930ffec4c2861 Mon Sep 17 00:00:00 2001 From: Andy Galasso Date: Sat, 21 Sep 2024 23:25:24 -0400 Subject: [PATCH] fix: a few ModelSerializer members missing type[] 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