mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #8523 from ArtyomKaltovich/fix_bool_issue
fix #8522: sphinx could lead to `__bool__` method call, what can lead to side effect or direct failure in case it generate an error bug
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -78,6 +78,7 @@ Bugs fixed
|
|||||||
* #8437: Makefile: ``make clean`` with empty BUILDDIR is dangerous
|
* #8437: Makefile: ``make clean`` with empty BUILDDIR is dangerous
|
||||||
* #8352: std domain: Failed to parse an option that starts with bracket
|
* #8352: std domain: Failed to parse an option that starts with bracket
|
||||||
* #8519: LaTeX: Prevent page brake in the middle of a seealso
|
* #8519: LaTeX: Prevent page brake in the middle of a seealso
|
||||||
|
* #8522: fix ``__bool__`` method could be called by autodoc module.
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
--------
|
--------
|
||||||
|
|||||||
@@ -716,7 +716,7 @@ class Documenter:
|
|||||||
isprivate = membername.startswith('_')
|
isprivate = membername.startswith('_')
|
||||||
|
|
||||||
keep = False
|
keep = False
|
||||||
if safe_getattr(member, '__sphinx_mock__', False):
|
if safe_getattr(member, '__sphinx_mock__', None) is not None:
|
||||||
# mocked module or object
|
# mocked module or object
|
||||||
pass
|
pass
|
||||||
elif self.options.exclude_members and membername in self.options.exclude_members:
|
elif self.options.exclude_members and membername in self.options.exclude_members:
|
||||||
|
|||||||
Reference in New Issue
Block a user