@@ -348,7 +348,10 @@ def __call__(self, inst, attr, value):
348348 self .member_validator (inst , attr , member )
349349 except Exception as e :
350350 orig_msg = e .args [0 ] if e .args else str (e )
351- if isinstance (orig_msg , str ) and "'" + attr .name + "'" in orig_msg :
351+ if (
352+ isinstance (orig_msg , str )
353+ and "'" + attr .name + "'" in orig_msg
354+ ):
352355 index_name = attr .name + "[" + str (idx ) + "]"
353356 new_msg = orig_msg .replace (
354357 "'" + attr .name + "'" ,
@@ -416,7 +419,10 @@ def __call__(self, inst, attr, value):
416419 self .key_validator (inst , attr , key )
417420 except Exception as e :
418421 orig_msg = e .args [0 ] if e .args else str (e )
419- if isinstance (orig_msg , str ) and "'" + attr .name + "'" in orig_msg :
422+ if (
423+ isinstance (orig_msg , str )
424+ and "'" + attr .name + "'" in orig_msg
425+ ):
420426 index_name = attr .name + "[key:" + repr (key ) + "]"
421427 new_msg = orig_msg .replace (
422428 "'" + attr .name + "'" ,
@@ -431,7 +437,10 @@ def __call__(self, inst, attr, value):
431437 self .value_validator (inst , attr , value [key ])
432438 except Exception as e :
433439 orig_msg = e .args [0 ] if e .args else str (e )
434- if isinstance (orig_msg , str ) and "'" + attr .name + "'" in orig_msg :
440+ if (
441+ isinstance (orig_msg , str )
442+ and "'" + attr .name + "'" in orig_msg
443+ ):
435444 index_name = attr .name + "[" + repr (key ) + "]"
436445 new_msg = orig_msg .replace (
437446 "'" + attr .name + "'" ,
0 commit comments