QEMU-Devel Archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org
Subject: [PATCH 4/7] qapidoc: Generate default Returns WIP
Date: Mon,  6 May 2024 13:02:48 +0200	[thread overview]
Message-ID: <20240506110254.3965097-9-armbru@redhat.com> (raw)
In-Reply-To: <20240506110254.3965097-1-armbru@redhat.com>

Affected:
x-debug-query-block-graph
query-tpm
query-dirty-rate
query-vcpu-dirty-limit
query-vm-generation-id
query-memory-size-summary
query-memory-devices
query-acpi-ospm-status
query-stats-schemas
---
 docs/sphinx/qapidoc.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

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 []
 
-- 
2.44.0



  parent reply	other threads:[~2024-05-06 11:04 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 11:02 [PULL 0/7] QAPI patches patches for 2024-05-06 Markus Armbruster
2024-05-06 11:02 ` [PULL 1/7] qapi: New QAPISchemaBranches, QAPISchemaAlternatives Markus Armbruster
2024-05-06 11:02 ` [PATCH 1/7] qapi: make since sections special WIP Markus Armbruster
2024-05-06 11:44   ` Philippe Mathieu-Daudé
2024-05-06 12:48     ` Markus Armbruster
2024-05-06 12:45   ` Markus Armbruster
2024-05-06 11:02 ` [PULL 2/7] qapi: Rename visitor parameter @variants to @branches Markus Armbruster
2024-05-06 11:02 ` [PATCH 2/7] sphinx/qapidoc: Tweak "Since" section formatting WIP Markus Armbruster
2024-05-06 12:45   ` Markus Armbruster
2024-05-06 11:02 ` [PULL 3/7] qapi: Rename visitor parameter @variants to @alternatives Markus Armbruster
2024-05-06 11:02 ` [PATCH 3/7] qapi: make returns sections special WIP Markus Armbruster
2024-05-06 12:46   ` Markus Armbruster
2024-05-06 11:02 ` [PULL 4/7] qapi: Rename QAPISchemaObjectType.variants to .branches Markus Armbruster
2024-05-06 11:02 ` Markus Armbruster [this message]
2024-05-06 12:46   ` [PATCH 4/7] qapidoc: Generate default Returns WIP Markus Armbruster
2024-05-06 11:02 ` [PATCH 5/7] qapi: Drop "Returns" section where default is fine WIP Markus Armbruster
2024-05-06 12:46   ` Markus Armbruster
2024-05-06 11:02 ` [PULL 5/7] qapi: Rename QAPISchemaAlternateType.variants to .alternatives Markus Armbruster
2024-05-06 11:02 ` [PULL 6/7] qapi: Move conditional code from QAPISchemaVariants to its subtypes Markus Armbruster
2024-05-06 11:02 ` [PATCH 6/7] qga/qapi-schema: Drop "Returns" section where default is fine WIP Markus Armbruster
2024-05-06 12:47   ` Markus Armbruster
2024-05-06 11:02 ` [PATCH 7/7] find untagged sections WIP Markus Armbruster
2024-05-06 12:47   ` Markus Armbruster
2024-05-06 11:02 ` [PULL 7/7] qapi: Simplify QAPISchemaVariants @tag_member Markus Armbruster
2024-05-06 19:58 ` [PULL 0/7] QAPI patches patches for 2024-05-06 Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240506110254.3965097-9-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).