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=''):
|
||||
"""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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user