Skip to content

Commit

Permalink
pythongh-99677: Deduplicate self-type in mro in inspect._getmembers
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Nov 22, 2022
1 parent 6d8da23 commit 8ca5e0d
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 8ca5e0d

Please sign in to comment.