aboutsummaryrefslogtreecommitdiff
path: root/docs/sphinx/qapidoc.py
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2025-03-10 23:42:56 -0400
committerMarkus Armbruster <armbru@redhat.com>2025-03-11 10:26:52 +0100
commit565274da10fe46bf8c30a8175e39753e4fedb60e (patch)
tree3331c6273dbc317ec9671e4fdd56ca252641205f /docs/sphinx/qapidoc.py
parent1884492e64da659323a8da4de98b344bc689f62a (diff)
downloadqemu-565274da10fe46bf8c30a8175e39753e4fedb60e.zip
qemu-565274da10fe46bf8c30a8175e39753e4fedb60e.tar.gz
qemu-565274da10fe46bf8c30a8175e39753e4fedb60e.tar.bz2
docs/qapidoc: generate entries for undocumented members
Presently, we never have any empty text entries for members. The next patch will explicitly generate such sections, so enable support for it in advance. The parser will generate placeholder sections to indicate undocumented members, but it's the qapidoc generator that's responsible for deciding what to do with that stub section. Signed-off-by: John Snow <jsnow@redhat.com> Message-ID: <20250311034303.75779-59-jsnow@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> [Tweak the stub section text] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'docs/sphinx/qapidoc.py')
-rw-r--r--docs/sphinx/qapidoc.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py
index a2d6f64..432fef0 100644
--- a/docs/sphinx/qapidoc.py
+++ b/docs/sphinx/qapidoc.py
@@ -233,11 +233,12 @@ class Transmogrifier:
# TODO: features for members (documented at entity-level,
# but sometimes defined per-member. Should we add such
# information to member descriptions when we can?)
- assert section.text and section.member
+ assert section.member
self.generate_field(
self.member_field_type,
section.member,
- section.text,
+ # TODO drop fallbacks when undocumented members are outlawed
+ section.text if section.text else "Not documented",
section.info,
)