[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 14/54] qapi2texi: minor python code simplific
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH v2 14/54] qapi2texi: minor python code simplification |
Date: |
Mon, 4 Sep 2017 04:18:16 -0400 (EDT) |
Hi
----- Original Message -----
> Marc-André Lureau <address@hidden> writes:
>
> > Signed-off-by: Marc-André Lureau <address@hidden>
> > ---
> > scripts/qapi2texi.py | 7 +++----
> > 1 file changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/scripts/qapi2texi.py b/scripts/qapi2texi.py
> > index a317526e51..8b542f9fff 100755
> > --- a/scripts/qapi2texi.py
> > +++ b/scripts/qapi2texi.py
> > @@ -136,10 +136,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 = ': %s' % typ if typ else ''
>
> I'd use string concatenation (': ' + typ) instead of interpolation.
> Matter of taste. Could make the change when I apply.
Good idea
>
> > + return '@item @code{%s%s}%s%s\n' % (
> > + member.name, membertype,
> > ' (optional)' if member.optional else '',
> > suffix)
>
> Reviewed-by: Markus Armbruster <address@hidden>
>
thanks