Skip to content

Commit 3329479

Browse files
committed
Apply review comment
#1446 (comment)
1 parent 36db406 commit 3329479

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/attr/_make.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,11 @@ def _create_slots_class(self):
865865
del self._cls.__weakref__
866866

867867
# Manually bump internal version tag.
868-
self._cls.__name__ = self._cls.__name__
868+
if hasattr(self._cls, "__abstractmethods__"):
869+
self._cls.__abstractmethods__ = self._cls.__abstractmethods__
870+
else:
871+
self._cls.__abstractmethods__ = frozenset({"__init__"})
872+
del self._cls.__abstractmethods__
869873

870874
# If our class doesn't have its own implementation of __setattr__
871875
# (either from the user or by us), check the bases, if one of them has

0 commit comments

Comments
 (0)