Message ID | 20240506110254.3965097-9-armbru@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [PULL,1/7] qapi: New QAPISchemaBranches, QAPISchemaAlternatives | expand |
Sent by accident, please ignore.
diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index 24bf1d9a90..35627ca741 100644 --- a/docs/sphinx/qapidoc.py +++ b/docs/sphinx/qapidoc.py @@ -251,9 +251,14 @@ def _nodes_for_features(self, doc): return [section] def _nodes_for_returns(self, doc, ret_type): - if doc.returns: + assert not doc.returns or ret_type + if ret_type: section = self._make_section('Returns') - self._parse_text_into_node(doc.returns.text, section) + if doc.returns: + self._parse_text_into_node(doc.returns.text, section) + else: + section += nodes.paragraph( + '', '', nodes.Text(ret_type.doc_type())) return [section] return []