diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2018-03-05 18:29:48 +0100 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2018-03-19 10:00:14 -0500 |
commit | 26ee12ad1f5fc1239b7366b696e813a27319b752 (patch) | |
tree | 82b4791570a602e86ad619b6f7d3abc81303a0df | |
parent | 2c8cfc0b52b5a4d123c26c0b5fdf941be24805be (diff) |
qapi2texi: minor python code simplification
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180305172951.2150-2-marcandre.lureau@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
-rw-r--r-- | scripts/qapi/doc.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/qapi/doc.py b/scripts/qapi/doc.py index 0ea68bf813..79d11bbe9b 100644 --- a/scripts/qapi/doc.py +++ b/scripts/qapi/doc.py @@ -134,10 +134,9 @@ def texi_enum_value(value): def texi_member(member, suffix=''): """Format a table of members item for an object type member""" typ = member.type.doc_type() - return '@item @code{%s%s%s}%s%s\n' % ( - member.name, - ': ' if typ else '', - typ if typ else '', + membertype = ': ' + typ if typ else '' + return '@item @code{%s%s}%s%s\n' % ( + member.name, membertype, ' (optional)' if member.optional else '', suffix) |