Skip to content

Commit 8ac0556

Browse files
committed
Default falsy 'get_doc' result to the empty-list
Applid in `AutosummaryDocumenter.get_grouped_documenters`. Fixes "TypeError: 'NoneType' object is not iterable" when using Sphinx v3.4 or later.
1 parent 6bc5815 commit 8ac0556

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autodocsumm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def get_grouped_documenters(self, all_members=False):
155155
self.env.temp_data['autodoc:class'] = self.objpath[0]
156156

157157
if not self.options.autosummary_force_inline:
158-
docstring = self.get_doc()
158+
docstring = self.get_doc() or []
159159
autodocsumm_directive = '.. auto%ssumm::' % self.objtype
160160
for s in chain.from_iterable(docstring):
161161
if autodocsumm_directive in s:

0 commit comments

Comments
 (0)