Skip to content

Commit

Permalink
gh-99677: Deduplicate self-type in mro in inspect._getmembers (#9…
Browse files Browse the repository at this point in the history
…9678)

Closes #99677
  • Loading branch information
sobolevn authored Nov 27, 2022
1 parent ac115b5 commit 2653b82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def _getmembers(object, predicate, getter):
processed = set()
names = dir(object)
if isclass(object):
mro = (object,) + getmro(object)
mro = getmro(object)
# add any DynamicClassAttributes to the list of names if object is a class;
# this may result in duplicate entries if, for example, a virtual
# attribute with the same name as a DynamicClassAttribute exists
Expand Down

0 comments on commit 2653b82

Please sign in to comment.