summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-04-21 00:55:10 +0900
committerGitHub <noreply@github.com>2020-04-21 00:55:10 +0900
commita65db71d79b6dcba5f771440ec2fcfaae62f5f40 (patch)
tree666b9d51fa5ff8cda879b07c156854f26142b53d
parentd08d4de01fbfcccc69bbe712e17773fd535ea5e1 (diff)
parent84413edd58856384b9edf73dd4ceb2690ef4354d (diff)
downloadsphinx-git-a65db71d79b6dcba5f771440ec2fcfaae62f5f40.tar.gz
Merge pull request #7520 from a-recknagel/3.0.x
fix for #7516
-rw-r--r--sphinx/ext/autodoc/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py
index 3c1f23bf1..855b86d87 100644
--- a/sphinx/ext/autodoc/__init__.py
+++ b/sphinx/ext/autodoc/__init__.py
@@ -578,9 +578,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__