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