@@ -138,7 +138,6 @@ class ClassProps(NamedTuple):
138138 match_args : bool
139139 str : bool
140140 getstate_setstate : bool
141- has_custom_setattr : bool
142141 on_setattr : Callable [[str , Any ], Any ]
143142 field_transformer : Callable [[Attribute ], Attribute ]
144143
@@ -715,6 +714,7 @@ def __init__(
715714 these ,
716715 auto_attribs : bool ,
717716 props : ClassProps ,
717+ has_custom_setattr : bool ,
718718 ):
719719 attrs , base_attrs , base_map = _transform_attrs (
720720 cls ,
@@ -749,7 +749,7 @@ def __init__(
749749 self ._is_exc = props .is_exception
750750 self ._on_setattr = props .on_setattr
751751
752- self ._has_custom_setattr = props . has_custom_setattr
752+ self ._has_custom_setattr = has_custom_setattr
753753 self ._wrote_own_setattr = False
754754
755755 self ._cls_dict ["__attrs_attrs__" ] = self ._attrs
@@ -1558,13 +1558,16 @@ def wrap(cls):
15581558 ("__getstate__" , "__setstate__" ),
15591559 default = slots ,
15601560 ),
1561- has_custom_setattr = has_own_setattr ,
15621561 on_setattr = on_setattr ,
15631562 field_transformer = field_transformer ,
15641563 )
15651564
15661565 builder = _ClassBuilder (
1567- cls , these , auto_attribs = auto_attribs , props = props
1566+ cls ,
1567+ these ,
1568+ auto_attribs = auto_attribs ,
1569+ props = props ,
1570+ has_custom_setattr = has_own_setattr ,
15681571 )
15691572
15701573 if props .repr is True :
0 commit comments