Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/attr/_make.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def _transform_attrs(
ca_names = {
name
for name, attr in cd.items()
if attr.__class__ is _CountingAttr
if issubclass(attr.__class__, _CountingAttr)
}
ca_list = []
annot_names = set()
Expand All @@ -413,7 +413,7 @@ def _transform_attrs(
annot_names.add(attr_name)
a = cd.get(attr_name, NOTHING)

if a.__class__ is not _CountingAttr:
if not issubclass(a.__class__, _CountingAttr):
a = attrib(a)
ca_list.append((attr_name, a))

Expand All @@ -431,7 +431,7 @@ def _transform_attrs(
(
(name, attr)
for name, attr in cd.items()
if attr.__class__ is _CountingAttr
if issubclass(attr.__class__, _CountingAttr)
),
key=lambda e: e[1].counter,
)
Expand Down
Loading