mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add a fix for objects whose getattr adds new members to __dict__.
This commit is contained in:
parent
67827b3806
commit
546a1b4187
@ -481,10 +481,12 @@ class Documenter(object):
|
||||
else:
|
||||
# __dict__ contains only the members directly defined in
|
||||
# the class (but get them via getattr anyway, to e.g. get
|
||||
# unbound method objects instead of function objects)
|
||||
# unbound method objects instead of function objects);
|
||||
# using keys() because apparently there are objects for which
|
||||
# __dict__ changes while getting attributes
|
||||
return False, sorted([
|
||||
(mname, self.get_attr(self.object, mname))
|
||||
for mname in self.get_attr(self.object, '__dict__')])
|
||||
for mname in self.get_attr(self.object, '__dict__').keys()])
|
||||
|
||||
def filter_members(self, members, want_all):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user