]> xenbits.xensource.com Git - libvirt.git/commitdiff
python: Add whitespace around = and % operators
authorRadostin Stoyanov <rstoyanov1@gmail.com>
Tue, 20 Mar 2018 06:48:47 +0000 (06:48 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 20 Mar 2018 12:13:35 +0000 (12:13 +0000)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
docs/apibuild.py
docs/index.py
tests/cputestdata/cpu-cpuid.py

index 73a7535dbb10302e362f7ecd44e973f2c985b129..a11c2d145a0666e5ef1c3eb3cab720708de28fb4 100755 (executable)
@@ -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 + " &amp;&amp; "
                 apstr = apstr + cond
-            output.write("      <cond>%s</cond>\n"% (apstr))
+            output.write("      <cond>%s</cond>\n" % (apstr))
         try:
             (ret, params, desc) = id.info
             output.write("      <info><![CDATA[%s]]></info>\n" % (desc))
@@ -2479,7 +2479,7 @@ class docBuilder:
                         output.write("      </letter>\n")
                         output.write("    </chunk>\n")
                         count = 0
-                        chunks.append(["chunk%s" % (chunk -1), first_letter, letter])
+                        chunks.append(["chunk%s" % (chunk - 1), first_letter, letter])
                     output.write("    <chunk name='chunk%s'>\n" % (chunk))
                     first_letter = id[0]
                     chunk = chunk + 1
@@ -2502,7 +2502,7 @@ class docBuilder:
             output.write("      </letter>\n")
             output.write("    </chunk>\n")
             if count != 0:
-                chunks.append(["chunk%s" % (chunk -1), first_letter, letter])
+                chunks.append(["chunk%s" % (chunk - 1), first_letter, letter])
             output.write("    <chunks>\n")
             for ch in chunks:
                 output.write("      <chunk name='%s' start='%s' end='%s'/>\n" % (
index e2f9185c363da568ac9fd1404869b4ae10933813..5224324b1b01087a89cc5015a78b9ce881a1a6cc 100755 (executable)
@@ -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
 
 #########################################################################
 #                                                                       #
index b74c3ce932a2ac6e9e0ba4f3cd6d48d935d9535a..43c92731a38300225b8bd7c5609637af440a33c5 100755 (executable)
@@ -325,7 +325,7 @@ def formatCpuid(cpuid, path, comment):
                 line = ("  <cpuid eax_in='0x%08x' ecx_in='0x%02x' "
                         "eax='0x%08x' ebx='0x%08x' "
                         "ecx='0x%08x' edx='0x%08x'/>\n")
-                f.write(line %(
+                f.write(line % (
                         in_eax, in_ecx,
                         leaf["eax"], leaf["ebx"], leaf["ecx"], leaf["edx"]))
         f.write("</cpudata>\n")