mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #10009: autodoc: Crashes if subject raises an error on getdoc()
This commit is contained in:
parent
6ad6594ec7
commit
6c6fed5e55
1
CHANGES
1
CHANGES
@ -46,6 +46,7 @@ Bugs fixed
|
||||
with Python 3.10
|
||||
* #9968: autodoc: instance variables are not shown if __init__ method has
|
||||
position-only-arguments
|
||||
* #10009: autodoc: Crashes if target object raises an error on getting docstring
|
||||
* #9947: i18n: topic directive having a bullet list can't be translatable
|
||||
* #9878: mathjax: MathJax configuration is placed after loading MathJax itself
|
||||
* #9857: Generated RFC links use outdated base url
|
||||
|
@ -711,6 +711,7 @@ class Documenter:
|
||||
|
||||
# process members and determine which to skip
|
||||
for obj in members:
|
||||
try:
|
||||
membername, member = obj
|
||||
# if isattr is True, the member is documented as an attribute
|
||||
if member is INSTANCEATTR:
|
||||
@ -754,12 +755,14 @@ class Documenter:
|
||||
if ismock(member) and (namespace, membername) not in attr_docs:
|
||||
# mocked module or object
|
||||
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):
|
||||
# remove members given by exclude-members
|
||||
keep = False
|
||||
elif want_all and special_member_re.match(membername):
|
||||
# special __methods__
|
||||
if self.options.special_members and membername in self.options.special_members:
|
||||
if (self.options.special_members and
|
||||
membername in self.options.special_members):
|
||||
if membername == '__doc__':
|
||||
keep = False
|
||||
elif is_filtered_inherited_member(membername, obj):
|
||||
@ -803,7 +806,6 @@ class Documenter:
|
||||
# should be skipped
|
||||
if self.env.app:
|
||||
# let extensions preprocess docstrings
|
||||
try:
|
||||
skip_user = self.env.app.emit_firstresult(
|
||||
'autodoc-skip-member', self.objtype, membername, member,
|
||||
not keep, self.options)
|
||||
|
Loading…
Reference in New Issue
Block a user