提交 26ee12ad 编写于 作者: M Marc-André Lureau 提交者: Eric Blake

qapi2texi: minor python code simplification

Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
Message-Id: <20180305172951.2150-2-marcandre.lureau@redhat.com>
Signed-off-by: NEric Blake <eblake@redhat.com>
上级 2c8cfc0b
...@@ -134,10 +134,9 @@ def texi_enum_value(value): ...@@ -134,10 +134,9 @@ def texi_enum_value(value):
def texi_member(member, suffix=''): def texi_member(member, suffix=''):
"""Format a table of members item for an object type member""" """Format a table of members item for an object type member"""
typ = member.type.doc_type() typ = member.type.doc_type()
return '@item @code{%s%s%s}%s%s\n' % ( membertype = ': ' + typ if typ else ''
member.name, return '@item @code{%s%s}%s%s\n' % (
': ' if typ else '', member.name, membertype,
typ if typ else '',
' (optional)' if member.optional else '', ' (optional)' if member.optional else '',
suffix) suffix)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册