Skip to content

Commit 2653b82

Browse files
authored
gh-99677: Deduplicate self-type in mro in inspect._getmembers (#99678)
Closes #99677
1 parent ac115b5 commit 2653b82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/inspect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def _getmembers(object, predicate, getter):
537537
processed = set()
538538
names = dir(object)
539539
if isclass(object):
540-
mro = (object,) + getmro(object)
540+
mro = getmro(object)
541541
# add any DynamicClassAttributes to the list of names if object is a class;
542542
# this may result in duplicate entries if, for example, a virtual
543543
# attribute with the same name as a DynamicClassAttribute exists

0 commit comments

Comments
 (0)