diff options
Diffstat (limited to 'sphinx/ext/autodoc/__init__.py')
-rw-r--r-- | sphinx/ext/autodoc/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py index 3e8b2d765..ed717387b 100644 --- a/sphinx/ext/autodoc/__init__.py +++ b/sphinx/ext/autodoc/__init__.py @@ -582,9 +582,9 @@ class Documenter: isprivate = membername.startswith('_') keep = False - if getattr(member, '__sphinx_mock__', False): + if safe_getattr(member, '__sphinx_mock__', False): # mocked module or object - keep = False + pass elif want_all and membername.startswith('__') and \ membername.endswith('__') and len(membername) > 4: # special __methods__ |