2929 Attribute ,
3030 ClassProps ,
3131 Factory ,
32- Hashability ,
33- KeywordOnly ,
3432 _AndValidator ,
3533 _Attributes ,
3634 _ClassBuilder ,
@@ -185,7 +183,7 @@ def test_no_modifications(self):
185183 Does not attach __attrs_attrs__ to the class.
186184 """
187185 C = make_tc ()
188- _transform_attrs (C , None , False , KeywordOnly .NO , True , None )
186+ _transform_attrs (C , None , False , ClassProps . KeywordOnly .NO , True , None )
189187
190188 assert None is getattr (C , "__attrs_attrs__" , None )
191189
@@ -195,7 +193,7 @@ def test_normal(self):
195193 """
196194 C = make_tc ()
197195 attrs , _ , _ = _transform_attrs (
198- C , None , False , KeywordOnly .NO , True , None
196+ C , None , False , ClassProps . KeywordOnly .NO , True , None
199197 )
200198
201199 assert ["z" , "y" , "x" ] == [a .name for a in attrs ]
@@ -210,7 +208,7 @@ class C:
210208 pass
211209
212210 assert _Attributes ((), [], {}) == _transform_attrs (
213- C , None , False , KeywordOnly .NO , True , None
211+ C , None , False , ClassProps . KeywordOnly .NO , True , None
214212 )
215213
216214 def test_transforms_to_attribute (self ):
@@ -219,7 +217,7 @@ def test_transforms_to_attribute(self):
219217 """
220218 C = make_tc ()
221219 attrs , base_attrs , _ = _transform_attrs (
222- C , None , False , KeywordOnly .NO , True , None
220+ C , None , False , ClassProps . KeywordOnly .NO , True , None
223221 )
224222
225223 assert [] == base_attrs
@@ -237,7 +235,9 @@ class C:
237235 y = attr .ib ()
238236
239237 with pytest .raises (ValueError ) as e :
240- _transform_attrs (C , None , False , KeywordOnly .NO , True , None )
238+ _transform_attrs (
239+ C , None , False , ClassProps .KeywordOnly .NO , True , None
240+ )
241241 assert (
242242 "No mandatory attributes allowed after an attribute with a "
243243 "default value or factory. Attribute in question: Attribute"
@@ -266,7 +266,7 @@ class C(B):
266266 y = attr .ib ()
267267
268268 attrs , base_attrs , _ = _transform_attrs (
269- C , None , False , KeywordOnly .YES , True , None
269+ C , None , False , ClassProps . KeywordOnly .YES , True , None
270270 )
271271
272272 assert len (attrs ) == 3
@@ -282,7 +282,7 @@ class C(B):
282282 C ,
283283 None ,
284284 False ,
285- KeywordOnly .FORCE ,
285+ ClassProps . KeywordOnly .FORCE ,
286286 True ,
287287 None ,
288288 )
@@ -308,7 +308,7 @@ class C(Base):
308308 y = attr .ib ()
309309
310310 attrs , base_attrs , _ = _transform_attrs (
311- C , {"x" : attr .ib ()}, False , KeywordOnly .NO , True , None
311+ C , {"x" : attr .ib ()}, False , ClassProps . KeywordOnly .NO , True , None
312312 )
313313
314314 assert [] == base_attrs
@@ -540,9 +540,9 @@ class C:
540540 repr = True ,
541541 eq = True ,
542542 order = True ,
543- hash = Hashability .HASHABLE_CACHED ,
543+ hash = ClassProps . Hashability .HASHABLE_CACHED ,
544544 match_args = False ,
545- kw_only = KeywordOnly .FORCE ,
545+ kw_only = ClassProps . KeywordOnly .FORCE ,
546546 has_weakref_slot = True ,
547547 collect_by_mro = False ,
548548 str = True ,
@@ -569,9 +569,9 @@ class CDef:
569569 repr = True ,
570570 eq = True ,
571571 order = True ,
572- hash = Hashability .UNHASHABLE ,
572+ hash = ClassProps . Hashability .UNHASHABLE ,
573573 match_args = True ,
574- kw_only = KeywordOnly .NO ,
574+ kw_only = ClassProps . KeywordOnly .NO ,
575575 has_weakref_slot = True ,
576576 collect_by_mro = False ,
577577 str = False ,
@@ -2011,9 +2011,9 @@ class C:
20112011 repr = True ,
20122012 eq = True ,
20132013 order = False ,
2014- hash = Hashability .UNHASHABLE ,
2014+ hash = ClassProps . Hashability .UNHASHABLE ,
20152015 match_args = True ,
2016- kw_only = KeywordOnly .NO ,
2016+ kw_only = ClassProps . KeywordOnly .NO ,
20172017 has_weakref_slot = False ,
20182018 collect_by_mro = True ,
20192019 str = False ,
@@ -2046,9 +2046,9 @@ class C:
20462046 repr = True ,
20472047 eq = True ,
20482048 order = False ,
2049- hash = Hashability .UNHASHABLE ,
2049+ hash = ClassProps . Hashability .UNHASHABLE ,
20502050 match_args = True ,
2051- kw_only = KeywordOnly .NO ,
2051+ kw_only = ClassProps . KeywordOnly .NO ,
20522052 has_weakref_slot = False ,
20532053 collect_by_mro = True ,
20542054 str = False ,
@@ -2147,9 +2147,9 @@ def our_hasattr(obj, name, /) -> bool:
21472147 repr = True ,
21482148 eq = True ,
21492149 order = False ,
2150- hash = Hashability .UNHASHABLE ,
2150+ hash = ClassProps . Hashability .UNHASHABLE ,
21512151 match_args = True ,
2152- kw_only = KeywordOnly .NO ,
2152+ kw_only = ClassProps . KeywordOnly .NO ,
21532153 has_weakref_slot = True ,
21542154 collect_by_mro = True ,
21552155 str = False ,
0 commit comments