Skip to content

Commit

Permalink
fix for #7516
Browse files Browse the repository at this point in the history
  • Loading branch information
a-recknagel committed Apr 20, 2020
1 parent d08d4de commit 84413ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sphinx/ext/autodoc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,9 +578,9 @@ def is_filtered_inherited_member(name: str) -> bool:
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__
Expand Down

0 comments on commit 84413ed

Please sign in to comment.