diff options
author | A. Jesse Jiryu Davis <jesse@emptysquare.net> | 2013-01-31 12:22:11 -0500 |
---|---|---|
committer | A. Jesse Jiryu Davis <jesse@emptysquare.net> | 2013-01-31 12:22:11 -0500 |
commit | 77ab000ddee6c5e07e23a1aa908e5e920ac5ff9d (patch) | |
tree | 3559540db909a700642d01f21820994fb823d443 /sphinx/util | |
parent | 90adca43d84a85217456ee9dc6b685d7d3195965 (diff) | |
download | sphinx-77ab000ddee6c5e07e23a1aa908e5e920ac5ff9d.tar.gz |
Respect add_autodoc_attrgetter() even when inherited-members is set
Diffstat (limited to 'sphinx/util')
-rw-r--r-- | sphinx/util/inspect.py | 4 |
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): |