Skip to content

Commit

Permalink
Clarify what need to be reset and when
Browse files Browse the repository at this point in the history
Signed-off-by: Hynek Schlawack <hs@ox.cx>
  • Loading branch information
hynek committed Sep 2, 2020
1 parent 8601087 commit 0960124
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/attr/_make.py
Expand Up @@ -669,8 +669,9 @@ def _create_slots_class(self):
if k not in tuple(self._attr_names) + ("__dict__", "__weakref__")
}

# Check the bases if one of them has an attrs-made __setattr__ that
# needs to be reset.
# If our class doesn't have an own __setattr__ (either from the user or
# by us), check the bases, if one of them has an attrs-made
# __setattr__, that needs to be reset.
# XXX: This can be confused by subclassing a slotted attrs class with
# XXX: a non-attrs class and subclass the resulting class with an attrs
# XXX: class. See `test_slotted_confused for details. For now that's
Expand Down

0 comments on commit 0960124

Please sign in to comment.