@@ -137,7 +137,6 @@ class ClassProps(NamedTuple):
137137 match_args : bool
138138 str : bool
139139 getstate_setstate : bool
140- has_custom_setattr : bool
141140 on_setattr : Callable [[str , Any ], Any ]
142141 field_transformer : Callable [[Attribute ], Attribute ]
143142
@@ -703,6 +702,7 @@ def __init__(
703702 these ,
704703 auto_attribs : bool ,
705704 props : ClassProps ,
705+ has_custom_setattr : bool ,
706706 ):
707707 attrs , base_attrs , base_map = _transform_attrs (
708708 cls ,
@@ -737,7 +737,7 @@ def __init__(
737737 self ._is_exc = props .is_exception
738738 self ._on_setattr = props .on_setattr
739739
740- self ._has_custom_setattr = props . has_custom_setattr
740+ self ._has_custom_setattr = has_custom_setattr
741741 self ._wrote_own_setattr = False
742742
743743 self ._cls_dict ["__attrs_attrs__" ] = self ._attrs
@@ -1536,13 +1536,16 @@ def wrap(cls):
15361536 ("__getstate__" , "__setstate__" ),
15371537 default = slots ,
15381538 ),
1539- has_custom_setattr = has_own_setattr ,
15401539 on_setattr = on_setattr ,
15411540 field_transformer = field_transformer ,
15421541 )
15431542
15441543 builder = _ClassBuilder (
1545- cls , these , auto_attribs = auto_attribs , props = props
1544+ cls ,
1545+ these ,
1546+ auto_attribs = auto_attribs ,
1547+ props = props ,
1548+ has_custom_setattr = has_own_setattr ,
15461549 )
15471550
15481551 if props .repr is True :
0 commit comments