[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
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH for-2.9 34/47] qapi: Move empty doc section checking to doc parser, (continued)
Re: [Qemu-devel] [PATCH for-2.9 34/47] qapi: Move empty doc section checking to doc parser, Eric Blake, 2017/03/14
[Qemu-devel] [PATCH for-2.9 31/47] qapi: Fix detection of doc / expression mismatch, Markus Armbruster, 2017/03/13
[Qemu-devel] [PATCH for-2.9 41/47] qapi: Factor add_name() calls out of the meta conditional, Markus Armbruster, 2017/03/13
[Qemu-devel] [PATCH for-2.9 19/47] qapi: Prefer single-quoted strings more consistently, Markus Armbruster, 2017/03/13
- Re: [Qemu-devel] [PATCH for-2.9 19/47] qapi: Prefer single-quoted strings more consistently,
Eric Blake <=
[Qemu-devel] [PATCH for-2.9 14/47] qapi: Prepare for requiring more complete documentation, Markus Armbruster, 2017/03/13
[Qemu-devel] [PATCH for-2.9 26/47] qapi2texi: Generate reference to base type members, Markus Armbruster, 2017/03/13
[Qemu-devel] [PATCH for-2.9 46/47] qapi: Make pylint a bit happier, Markus Armbruster, 2017/03/13
[Qemu-devel] [PATCH for-2.9 27/47] qapi2texi: Generate documentation for variant members, Markus Armbruster, 2017/03/13