From 293bb82b587630fa8b7a7c89684b66d05c322cbe Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Tue, 20 Mar 2018 06:48:47 +0000 Subject: [PATCH] python: Add whitespace around = and % operators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Daniel P. Berrangé Signed-off-by: Radostin Stoyanov --- docs/apibuild.py | 18 +++++++++--------- docs/index.py | 6 +++--- tests/cputestdata/cpu-cpuid.py | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/apibuild.py b/docs/apibuild.py index 73a7535dbb..a11c2d145a 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -15,10 +15,10 @@ import sys import glob import re -quiet=True -warnings=0 -debug=False -debugsym=None +quiet = True +warnings = 0 +debug = False +debugsym = None # # C parser analysis code @@ -132,7 +132,7 @@ def escape(raw): def uniq(items): d = {} for item in items: - d[item]=1 + d[item] = 1 k = sorted(d.keys()) return k @@ -1408,7 +1408,7 @@ class CParser: value = "%d" % (int(value) + 1) except: self.warning("Failed to compute value of enum %s" % (name)) - value="" + value = "" if token[0] == "sep" and token[1] == ",": if commentsBeforeVal: self.cleanupComment() @@ -2286,7 +2286,7 @@ class docBuilder: if apstr != "": apstr = apstr + " && " apstr = apstr + cond - output.write(" %s\n"% (apstr)) + output.write(" %s\n" % (apstr)) try: (ret, params, desc) = id.info output.write(" \n" % (desc)) @@ -2479,7 +2479,7 @@ class docBuilder: output.write(" \n") output.write(" \n") count = 0 - chunks.append(["chunk%s" % (chunk -1), first_letter, letter]) + chunks.append(["chunk%s" % (chunk - 1), first_letter, letter]) output.write(" \n" % (chunk)) first_letter = id[0] chunk = chunk + 1 @@ -2502,7 +2502,7 @@ class docBuilder: output.write(" \n") output.write(" \n") if count != 0: - chunks.append(["chunk%s" % (chunk -1), first_letter, letter]) + chunks.append(["chunk%s" % (chunk - 1), first_letter, letter]) output.write(" \n") for ch in chunks: output.write(" \n" % ( diff --git a/docs/index.py b/docs/index.py index e2f9185c36..5224324b1b 100755 --- a/docs/index.py +++ b/docs/index.py @@ -58,7 +58,7 @@ libxml2.registerErrorHandler(callback, None) # The dictionary of tables required and the SQL command needed # to create them # -TABLES={ +TABLES = { "symbols": """CREATE TABLE symbols ( name varchar(255) BINARY NOT NULL, module varchar(255) BINARY NOT NULL, @@ -116,8 +116,8 @@ TABLES={ # # The XML API description file to parse # -API="libvirt-api.xml" -DB=None +API = "libvirt-api.xml" +DB = None ######################################################################### # # diff --git a/tests/cputestdata/cpu-cpuid.py b/tests/cputestdata/cpu-cpuid.py index b74c3ce932..43c92731a3 100755 --- a/tests/cputestdata/cpu-cpuid.py +++ b/tests/cputestdata/cpu-cpuid.py @@ -325,7 +325,7 @@ def formatCpuid(cpuid, path, comment): line = (" \n") - f.write(line %( + f.write(line % ( in_eax, in_ecx, leaf["eax"], leaf["ebx"], leaf["ecx"], leaf["edx"])) f.write("\n") -- GitLab