]> git.ipfire.org Git - thirdparty/qemu.git/commit
docs/qapidoc: add format_type() method
authorJohn Snow <jsnow@redhat.com>
Tue, 11 Mar 2025 03:42:44 +0000 (23:42 -0400)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 11 Mar 2025 09:10:57 +0000 (10:10 +0100)
commit3a396a865be6a55322baa854c470c43c0a9f64e6
tree6aa189ec9f9cdbd7e7f848adbed01b52c256fd8e
parente9fbf1a0c6c2df9c53bb577b4245cf48914687fe
docs/qapidoc: add format_type() method

This method is responsible for generating a type name for a given member
with the correct annotations for the QAPI domain. Features and enums do
not *have* types, so they return None. Everything else returns the type
name with a "?" suffix if that type is optional, and ensconced in
[brackets] if it's an array type.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-ID: <20250311034303.75779-47-jsnow@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
docs/sphinx/qapidoc.py