File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,9 +80,6 @@ def __repr__(self):
8080 def __bool__ (self ):
8181 return False
8282
83- def __len__ (self ):
84- return 0 # __bool__ for Python 2
85-
8683
8784NOTHING = _Nothing ()
8885"""
@@ -1182,8 +1179,6 @@ def _determine_whether_to_implement(
11821179 whose presence signal that the user has implemented it themselves.
11831180
11841181 Return *default* if no reason for either for or against is found.
1185-
1186- auto_detect must be False on Python 2.
11871182 """
11881183 if flag is True or flag is False :
11891184 return flag
@@ -1487,10 +1482,6 @@ def attrs(
14871482 on_setattr = setters .pipe (* on_setattr )
14881483
14891484 def wrap (cls ):
1490-
1491- if getattr (cls , "__class__" , None ) is None :
1492- raise TypeError ("attrs only works with new-style classes." )
1493-
14941485 is_frozen = frozen or _has_frozen_base_class (cls )
14951486 is_exc = auto_exc is True and issubclass (cls , BaseException )
14961487 has_own_setattr = auto_detect and _has_own_attribute (
You can’t perform that action at this time.
0 commit comments