diff options
author | 2017-03-15 13:57:08 +0100 | |
---|---|---|
committer | 2017-03-16 07:13:02 +0100 | |
commit | ef801a9bb1e2cf276a8482c4ad1910f72de223f8 (patch) | |
tree | e00e87806c5bcc5770bc65c6b4495194aef51dfc /scripts/qapi-types.py | |
parent | qapi: Use raw strings for regular expressions consistently (diff) | |
download | qemu-ef801a9bb1e2cf276a8482c4ad1910f72de223f8.tar.xz qemu-ef801a9bb1e2cf276a8482c4ad1910f72de223f8.zip |
qapi: Prefer single-quoted strings more consistently
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 <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1489582656-31133-20-git-send-email-armbru@redhat.com>
Diffstat (limited to 'scripts/qapi-types.py')
-rw-r--r-- | scripts/qapi-types.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index dabc42e047..b45e7b5634 100644 --- a/scripts/qapi-types.py +++ b/scripts/qapi-types.py @@ -244,10 +244,10 @@ class QAPISchemaGenTypeVisitor(QAPISchemaVisitor): do_builtins = False (input_file, output_dir, do_c, do_h, prefix, opts) = \ - parse_command_line("b", ["builtins"]) + parse_command_line('b', ['builtins']) for o, a in opts: - if o in ("-b", "--builtins"): + if o in ('-b', '--builtins'): do_builtins = True c_comment = ''' |