qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.9 19/47] qapi: Prefer single-quoted string


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH for-2.9 19/47] qapi: Prefer single-quoted strings more consistently
Date: Tue, 14 Mar 2017 13:05:25 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 03/13/2017 01:18 AM, Markus Armbruster wrote:
> PEP 8 advises:
> 
>     In Python, single-quoted strings and double-quoted strings are the
>     same.  This PEP does not make a recommendation for this.  Pick a
>     rule and stick to it.  When a string contains single or double
>     quote characters, however, use the other one to avoid backslashes
>     in the string.  It improves readability.
> 
> The QAPI generators succeed at picking a rule, but fail at sticking to
> it.  Convert a bunch of double-quoted strings to single-quoted ones.
> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  scripts/qapi-event.py      |  2 +-
>  scripts/qapi-introspect.py |  4 +-
>  scripts/qapi-types.py      |  4 +-
>  scripts/qapi-visit.py      |  4 +-
>  scripts/qapi.py            | 96 
> +++++++++++++++++++++++-----------------------
>  scripts/qapi2texi.py       | 46 +++++++++++-----------
>  6 files changed, 78 insertions(+), 78 deletions(-)
> 

Purely stylistic, so I wouldn't do it as a lone patch. But as part of a
larger series, I think you're fine.

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]