mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-29 21:33:53 -06:00
sphinx/qapidoc: Drop code to generate doc for simple union branch
Commit 4e99f4b12c
(qapi: Drop simple unions) eliminated implicitly
defined union branch types, except for the empty object type
'q_empty'. QAPISchemaGenRSTVisitor._nodes_for_members() still has
code to generate documentation for implicitly defined union branch
types. It does nothing for 'q_empty'. Simplify.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240216145841.2099240-5-armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
0ba2915b92
commit
e51e80ccf6
1 changed files with 7 additions and 11 deletions
|
@ -180,17 +180,13 @@ class QAPISchemaGenRSTVisitor(QAPISchemaVisitor):
|
||||||
|
|
||||||
if variants:
|
if variants:
|
||||||
for v in variants.variants:
|
for v in variants.variants:
|
||||||
if v.type.is_implicit():
|
if v.type.name == 'q_empty':
|
||||||
assert not v.type.base and not v.type.variants
|
continue
|
||||||
for m in v.type.local_members:
|
assert not v.type.is_implicit()
|
||||||
term = self._nodes_for_one_member(m)
|
term = [nodes.Text('The members of '),
|
||||||
term.extend(self._nodes_for_variant_when(variants, v))
|
nodes.literal('', v.type.doc_type())]
|
||||||
dlnode += self._make_dlitem(term, None)
|
term.extend(self._nodes_for_variant_when(variants, v))
|
||||||
else:
|
dlnode += self._make_dlitem(term, None)
|
||||||
term = [nodes.Text('The members of '),
|
|
||||||
nodes.literal('', v.type.doc_type())]
|
|
||||||
term.extend(self._nodes_for_variant_when(variants, v))
|
|
||||||
dlnode += self._make_dlitem(term, None)
|
|
||||||
|
|
||||||
if not dlnode.children:
|
if not dlnode.children:
|
||||||
return []
|
return []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue