summaryrefslogtreecommitdiff
path: root/sphinx/util
diff options
context:
space:
mode:
authorA. Jesse Jiryu Davis <jesse@emptysquare.net>2013-01-31 12:22:11 -0500
committerA. Jesse Jiryu Davis <jesse@emptysquare.net>2013-01-31 12:22:11 -0500
commit77ab000ddee6c5e07e23a1aa908e5e920ac5ff9d (patch)
tree3559540db909a700642d01f21820994fb823d443 /sphinx/util
parent90adca43d84a85217456ee9dc6b685d7d3195965 (diff)
downloadsphinx-77ab000ddee6c5e07e23a1aa908e5e920ac5ff9d.tar.gz
Respect add_autodoc_attrgetter() even when inherited-members is set
Diffstat (limited to 'sphinx/util')
-rw-r--r--sphinx/util/inspect.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py
index 8cd93eaf..95b7cb1e 100644
--- a/sphinx/util/inspect.py
+++ b/sphinx/util/inspect.py
@@ -78,12 +78,12 @@ def safe_getattr(obj, name, *defargs):
raise AttributeError(name)
-def safe_getmembers(object, predicate=None):
+def safe_getmembers(object, predicate=None, attr_getter=safe_getattr):
"""A version of inspect.getmembers() that uses safe_getattr()."""
results = []
for key in dir(object):
try:
- value = safe_getattr(object, key, None)
+ value = attr_getter(object, key, None)
except AttributeError:
continue
if not predicate or predicate(value):