From: John Snow Date: Tue, 11 Mar 2025 03:42:56 +0000 (-0400) Subject: docs/qapidoc: generate entries for undocumented members X-Git-Tag: v10.0.0-rc0~11^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=565274da10fe46bf8c30a8175e39753e4fedb60e;p=thirdparty%2Fqemu.git 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 Message-ID: <20250311034303.75779-59-jsnow@redhat.com> Acked-by: Markus Armbruster [Tweak the stub section text] Signed-off-by: Markus Armbruster --- diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index a2d6f648a2..432fef04b0 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, )