mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
2c8cfc0b52
commit
26ee12ad1f
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue