From e924bee367399a35f9af35da22b0aca3ca34c9f1 Mon Sep 17 00:00:00 2001 From: Asif Saif Uddin Date: Sat, 28 Dec 2024 16:10:50 +0600 Subject: [PATCH] Update rest_framework/validators.py Co-authored-by: Paolo Melchiorre --- rest_framework/validators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/validators.py b/rest_framework/validators.py index cc31dcb88b..dd192da3a7 100644 --- a/rest_framework/validators.py +++ b/rest_framework/validators.py @@ -193,7 +193,7 @@ def __call__(self, attrs, serializer): raise ValidationError(message, code='unique') def __repr__(self): - return '<%s(%s)>' % ( + return '<{}({})>'.format( self.__class__.__name__, ', '.join( f'{attr}={smart_repr(getattr(self, attr))}'