Skip to content

Commit 565274d

Browse files
jnsnowMarkus Armbruster
authored andcommitted
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 <[email protected]> Message-ID: <[email protected]> Acked-by: Markus Armbruster <[email protected]> [Tweak the stub section text] Signed-off-by: Markus Armbruster <[email protected]>
1 parent 1884492 commit 565274d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/sphinx/qapidoc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,12 @@ def visit_member(self, section: QAPIDoc.ArgSection) -> None:
233233
# TODO: features for members (documented at entity-level,
234234
# but sometimes defined per-member. Should we add such
235235
# information to member descriptions when we can?)
236-
assert section.text and section.member
236+
assert section.member
237237
self.generate_field(
238238
self.member_field_type,
239239
section.member,
240-
section.text,
240+
# TODO drop fallbacks when undocumented members are outlawed
241+
section.text if section.text else "Not documented",
241242
section.info,
242243
)
243244

0 commit comments

Comments
 (0)