Skip to content
Snippets Groups Projects
Unverified Commit 2653b82c authored by Nikita Sobolev's avatar Nikita Sobolev Committed by GitHub
Browse files

gh-99677: Deduplicate self-type in `mro` in `inspect._getmembers` (#99678)

Closes #99677
parent ac115b51
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment