summary refs log tree commit diff stats
path: root/docs/sphinx/qapidoc.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2024-02-16 15:58:32 +0100
committerMarkus Armbruster <armbru@redhat.com>2024-02-26 10:43:56 +0100
commit31c54b92ad0816ab1c4eddaf4b60c0b17a75dfc9 (patch)
tree2fabfd671610166425b115d94317c99617854e6c /docs/sphinx/qapidoc.py
parent573e2223f91a1662dad3c4ab5f6724bbe2633eff (diff)
downloadfocaccia-qemu-31c54b92ad0816ab1c4eddaf4b60c0b17a75dfc9.tar.gz
focaccia-qemu-31c54b92ad0816ab1c4eddaf4b60c0b17a75dfc9.zip
qapi: Rename QAPIDoc.Section.name to .tag
Since the previous commit, QAPIDoc.Section.name is either
None (untagged section) or the section's tag string ('Returns',
'@name', ...).  Rename it to .tag.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240216145841.2099240-9-armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'docs/sphinx/qapidoc.py')
-rw-r--r--docs/sphinx/qapidoc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py
index 1e8b4a70a1..8d428c64b0 100644
--- a/docs/sphinx/qapidoc.py
+++ b/docs/sphinx/qapidoc.py
@@ -258,11 +258,11 @@ class QAPISchemaGenRSTVisitor(QAPISchemaVisitor):
         """Return list of doctree nodes for additional sections"""
         nodelist = []
         for section in doc.sections:
-            if section.name and section.name == 'TODO':
+            if section.tag and section.tag == 'TODO':
                 # Hide TODO: sections
                 continue
-            snode = self._make_section(section.name)
-            if section.name and section.name.startswith('Example'):
+            snode = self._make_section(section.tag)
+            if section.tag and section.tag.startswith('Example'):
                 snode += self._nodes_for_example(section.text)
             else:
                 self._parse_text_into_node(section.text, snode)