From f4b6dd0849b446cec1ce19a0a1f238688bf5c81f Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 24 Jan 2026 14:39:33 +0000 Subject: [PATCH] Tweak formatting --- rest_framework/serializers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index 5b046f71c..e1708dea6 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -313,11 +313,11 @@ class SerializerMetaclass(type): def as_serializer_error(exc): """ - coerce validation exceptions into a standardized serializer error format. + Coerce validation exceptions into a standardized serialized error format. - this function normalizes both Django's 'ValidationError' and REST - framework's 'ValidationError' into a dictionary structure compatible - with serializer '.errors', ensuring all values are represented as + This function normalizes both Django's `ValidationError` and REST + framework's `ValidationError` into a dictionary structure compatible + with serializer `.errors`, ensuring all values are represented as lists of error details. The returned structure conforms to the serializer error contract: