diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-12-29 18:33:36 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-12-29 18:33:36 +0900 |
commit | 3f7bf48715ed5d6b0cf5d2645ee2886975b97b10 (patch) | |
tree | 737b5a11f1285b1bd342ae56ea07be516e2a57f4 /sphinx/ext/autodoc/__init__.py | |
parent | b24ae7e206ebcae194a048ac4d980fc7b32d333d (diff) | |
parent | aaee3520f393babd87a34edda48793ed29804365 (diff) | |
download | sphinx-git-3f7bf48715ed5d6b0cf5d2645ee2886975b97b10.tar.gz |
Merge branch '3.4.x' into 3.x
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 d691ca2ba..4c153a5de 100644 --- a/sphinx/ext/autodoc/__init__.py +++ b/sphinx/ext/autodoc/__init__.py @@ -27,7 +27,7 @@ from sphinx.deprecation import (RemovedInSphinx40Warning, RemovedInSphinx50Warni from sphinx.environment import BuildEnvironment from sphinx.ext.autodoc.importer import (ClassAttribute, get_class_members, get_object_members, import_module, import_object) -from sphinx.ext.autodoc.mock import mock +from sphinx.ext.autodoc.mock import ismock, mock from sphinx.locale import _, __ from sphinx.pycode import ModuleAnalyzer, PycodeError from sphinx.util import inspect, logging @@ -739,7 +739,7 @@ class Documenter: isprivate = membername.startswith('_') keep = False - if safe_getattr(member, '__sphinx_mock__', None) is not None: + if ismock(member): # mocked module or object pass elif self.options.exclude_members and membername in self.options.exclude_members: |