From nobody Sat Jul 5 15:55:37 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521296898834207.80849886418298; Sat, 17 Mar 2018 07:28:18 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 65231C04C28A; Sat, 17 Mar 2018 14:28:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4302E620BF; Sat, 17 Mar 2018 14:28:17 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0F32B4CAA1; Sat, 17 Mar 2018 14:28:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2HEOALq000666 for ; Sat, 17 Mar 2018 10:24:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id D3C047EE22; Sat, 17 Mar 2018 14:24:10 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD6AB7EE20 for ; Sat, 17 Mar 2018 14:24:07 +0000 (UTC) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4C48B7FEB0 for ; Sat, 17 Mar 2018 14:24:00 +0000 (UTC) Received: by mail-wm0-f44.google.com with SMTP id h76so7979827wme.4 for ; Sat, 17 Mar 2018 07:24:00 -0700 (PDT) Received: from rst.Home ([2a02:c7d:692a:c500:1ebc:73f3:5f60:b131]) by smtp.gmail.com with ESMTPSA id i66sm11060550wmd.0.2018.03.17.07.23.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Mar 2018 07:23:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=usPrnNBSOyojfNjubI1q7rJcAVy1YFH7pswsJzt5LDI=; b=vgnlgIzz62KerWFA/PMFzAUdwUb2Yeu3E5XC+hyOx0/lCWsAQ0LGC8P2E31r30x9Vl uImXyZ0b0cGEaLmDf5+LLML793nnThTMfxBALyQL0I6ojxgxYWVeuZ9YS5VTgn5xSgJo US5TrNyNWQv7BGSG4jeegqIHzbT74j8/Vy8ZvPFfTOnXuphd08HBUTZ9RF8wCH4soKjb ZiY9PzgO2j5slrMvlCHYGA6IxRdEHBDjaQ13xQwYxerpRe/a8Cjg9YXpL2d/oMH5OuiJ Te6kGkBPd6Ey3wWBwpx33gajjoRNu6v8E2jZ09XIsa7JXgqaSoeLqQ0CAhWdpPnN4XKw LyUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=usPrnNBSOyojfNjubI1q7rJcAVy1YFH7pswsJzt5LDI=; b=cfobQSgXOQou4n+lH4Eo80XJZfyQD1xd3vaLHJ5f3lRYhrrqHbhX+rP9nFaEeIshCh +wLxeab2VpGxst/nYQsovwpO7/fyCO3URSQUzjFIHZTLuOUdnJqLBs67t3Plz2/ppYBE uku7DXlxuY60xD59GkLWAkbuoLVkWUiHiLH+Xuc9KYq7lwWj9qkvrw8f6BajNxnvodqP P26+hpCBSrDjARZLNTcBtW16LIVo4AT7gw9Z3R0L1qAfA3Ovb2yw6WVBxQGYG8QUQO/Y ElG4dWuyMRuQS4T7lQHAyZzvLALB5rDJKCAdJk57pwwNRvnXOqCBTsIunqNV36VcpDZx aR2g== X-Gm-Message-State: AElRT7FUUiyPjb7u9iEVOXnQVbcZXfgnc1u4m9IHVncanKu7o6mT5wVq Hdj/Ky/A9OTm7otN0cYHJrsjQO4r X-Google-Smtp-Source: AG47ELveL6Cz4czfPyQqRdrTUS06WPcdvRaKpJU+mToa44IhfMNy+My7ifUILlynF8D3g4tNmF18kw== X-Received: by 10.28.88.211 with SMTP id m202mr4784510wmb.160.1521296638554; Sat, 17 Mar 2018 07:23:58 -0700 (PDT) From: Radostin Stoyanov To: libvir-list@redhat.com Date: Sat, 17 Mar 2018 14:23:28 +0000 Message-Id: <20180317142340.11653-11-rstoyanov1@gmail.com> In-Reply-To: <20180317142340.11653-1-rstoyanov1@gmail.com> References: <20180317142340.11653-1-rstoyanov1@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 17 Mar 2018 14:24:00 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 17 Mar 2018 14:24:00 +0000 (UTC) for IP:'74.125.82.44' DOMAIN:'mail-wm0-f44.google.com' HELO:'mail-wm0-f44.google.com' FROM:'rstoyanov1@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.12 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 74.125.82.44 mail-wm0-f44.google.com 74.125.82.44 mail-wm0-f44.google.com X-Scanned-By: MIMEDefang 2.83 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Radostin Stoyanov Subject: [libvirt] [PATCH 10/22] python: Remove space around = in keyword args X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sat, 17 Mar 2018 14:28:17 +0000 (UTC) X-ZohoMail-DKIM: fail (Computed bodyhash is different from the expected one) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" PEP8 recommends not having spaces around =3D in a keyword argument or a default parameter value. https://www.python.org/dev/peps/pep-0008/#other-recommendations Signed-off-by: Radostin Stoyanov Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/apibuild.py | 24 ++++++++++++------------ docs/index.py | 26 +++++++++++++------------- src/esx/esx_vi_generator.py | 4 ++-- tests/cputestdata/cpu-cpuid.py | 4 ++-- tests/cputestdata/cpu-reformat.py | 2 +- 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/docs/apibuild.py b/docs/apibuild.py index 1b9401226..8fecf5a81 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -137,8 +137,8 @@ def uniq(items): return k =20 class identifier: - def __init__(self, name, header=3DNone, module=3DNone, type=3DNone, li= neno =3D 0, - info=3DNone, extra=3DNone, conditionals =3D None): + def __init__(self, name, header=3DNone, module=3DNone, type=3DNone, li= neno=3D0, + info=3DNone, extra=3DNone, conditionals=3DNone): self.name =3D name self.header =3D header self.module =3D module @@ -209,7 +209,7 @@ class identifier: def get_conditionals(self): return self.conditionals =20 - def update(self, header, module, type =3D None, info =3D None, extra= =3DNone, + def update(self, header, module, type=3DNone, info=3DNone, extra=3DNon= e, conditionals=3DNone): if self.name =3D=3D debugsym and not quiet: print("=3D> update %s : %s" % (debugsym, (module, type, info, @@ -228,7 +228,7 @@ class identifier: self.set_conditionals(conditionals) =20 class index: - def __init__(self, name =3D "noname"): + def __init__(self, name=3D"noname"): self.name =3D name self.identifiers =3D {} self.functions =3D {} @@ -247,7 +247,7 @@ class index: warnings =3D warnings + 1 print(msg) =20 - def add_ref(self, name, header, module, static, type, lineno, info=3DN= one, extra=3DNone, conditionals =3D None): + def add_ref(self, name, header, module, static, type, lineno, info=3DN= one, extra=3DNone, conditionals=3DNone): if name[0:2] =3D=3D '__': return None d =3D None @@ -269,7 +269,7 @@ class index: =20 return d =20 - def add(self, name, header, module, static, type, lineno, info=3DNone,= extra=3DNone, conditionals =3D None): + def add(self, name, header, module, static, type, lineno, info=3DNone,= extra=3DNone, conditionals=3DNone): if name[0:2] =3D=3D '__': return None d =3D None @@ -630,7 +630,7 @@ class CLexer: =20 class CParser: """The C module parser""" - def __init__(self, filename, idx =3D None): + def __init__(self, filename, idx=3DNone): self.filename =3D filename if len(filename) > 2 and filename[-2:] =3D=3D '.h': self.is_header =3D 1 @@ -662,7 +662,7 @@ class CParser: def lineno(self): return self.lexer.getlineno() =20 - def index_add(self, name, module, static, type, info=3DNone, extra =3D= None): + def index_add(self, name, module, static, type, info=3DNone, extra=3DN= one): if self.is_header =3D=3D 1: self.index.add(name, module, module, static, type, self.lineno= (), info, extra, self.conditionals) @@ -671,7 +671,7 @@ class CParser: info, extra, self.conditionals) =20 def index_add_ref(self, name, module, static, type, info=3DNone, - extra =3D None): + extra=3DNone): if self.is_header =3D=3D 1: self.index.add_ref(name, module, module, static, type, self.lineno(), info, extra, self.conditiona= ls) @@ -764,7 +764,7 @@ class CParser: # # Parse a comment block associate to a typedef # - def parseTypeComment(self, name, quiet =3D 0): + def parseTypeComment(self, name, quiet=3D0): if name[0:2] =3D=3D '__': quiet =3D 1 =20 @@ -809,7 +809,7 @@ class CParser: # # Parse a comment block associate to a macro # - def parseMacroComment(self, name, quiet =3D 0): + def parseMacroComment(self, name, quiet=3D0): global ignored_macros =20 if name[0:2] =3D=3D '__': @@ -886,7 +886,7 @@ class CParser: # parameters descriptions, finally returns a block as complete # as possible # - def mergeFunctionComment(self, name, description, quiet =3D 0): + def mergeFunctionComment(self, name, description, quiet=3D0): global ignored_functions =20 if name =3D=3D 'main': diff --git a/docs/index.py b/docs/index.py index 5224324b1..0d07ca4d0 100755 --- a/docs/index.py +++ b/docs/index.py @@ -144,7 +144,7 @@ def createTable(db, name): return -1 return ret =20 -def checkTables(db, verbose =3D 1): +def checkTables(db, verbose=3D1): global TABLES =20 if db is None: @@ -188,7 +188,7 @@ def checkTables(db, verbose =3D 1): pass return 0 =20 -def openMySQL(db=3D"libvir", passwd=3DNone, verbose =3D 1): +def openMySQL(db=3D"libvir", passwd=3DNone, verbose=3D1): global DB =20 if passwd is None: @@ -275,25 +275,25 @@ def updateSymbol(name, module, type, desc): =20 return ret =20 -def addFunction(name, module, desc =3D ""): +def addFunction(name, module, desc=3D""): return updateSymbol(name, module, 'function', desc) =20 -def addMacro(name, module, desc =3D ""): +def addMacro(name, module, desc=3D""): return updateSymbol(name, module, 'macro', desc) =20 -def addEnum(name, module, desc =3D ""): +def addEnum(name, module, desc=3D""): return updateSymbol(name, module, 'enum', desc) =20 -def addStruct(name, module, desc =3D ""): +def addStruct(name, module, desc=3D""): return updateSymbol(name, module, 'struct', desc) =20 -def addConst(name, module, desc =3D ""): +def addConst(name, module, desc=3D""): return updateSymbol(name, module, 'const', desc) =20 -def addType(name, module, desc =3D ""): +def addType(name, module, desc=3D""): return updateSymbol(name, module, 'type', desc) =20 -def addFunctype(name, module, desc =3D ""): +def addFunctype(name, module, desc=3D""): return updateSymbol(name, module, 'functype', desc) =20 def addPage(resource, title): @@ -1055,7 +1055,7 @@ def analyzeHTMLPages(): =20 import time =20 -def getXMLDateArchive(t =3D None): +def getXMLDateArchive(t=3DNone): if t is None: t =3D time.time() T =3D time.gmtime(t) @@ -1064,7 +1064,7 @@ def getXMLDateArchive(t =3D None): url =3D "http://www.redhat.com/archives/libvir-list/%d-%s/date.html" %= (year, month) return url =20 -def scanXMLMsgArchive(url, title, force =3D 0): +def scanXMLMsgArchive(url, title, force=3D0): if url is None or title is None: return 0 =20 @@ -1094,7 +1094,7 @@ def scanXMLMsgArchive(url, title, force =3D 0): =20 return 1 =20 -def scanXMLDateArchive(t =3D None, force =3D 0): +def scanXMLDateArchive(t=3DNone, force=3D0): global wordsDictArchive =20 wordsDictArchive =3D {} @@ -1138,7 +1138,7 @@ def scanXMLDateArchive(t =3D None, force =3D 0): # Main code: open the DB, the API XML and analyze it # # # ######################################################################### -def analyzeArchives(t =3D None, force =3D 0): +def analyzeArchives(t=3DNone, force=3D0): global wordsDictArchive =20 ret =3D scanXMLDateArchive(t, force) diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py index 0dca44fed..1e61cc71e 100755 --- a/src/esx/esx_vi_generator.py +++ b/src/esx/esx_vi_generator.py @@ -118,7 +118,7 @@ class Parameter(Member): return aligned(string, self.get_occurrence_comment() + "\n") =20 =20 - def generate_return(self, offset =3D 0, end_of_line =3D ";"): + def generate_return(self, offset=3D0, end_of_line=3D";"): if self.occurrence =3D=3D OCCURRENCE__IGNORED: raise ValueError("invalid function parameter occurrence value = '%s'" % self.occurrence) @@ -609,7 +609,7 @@ class Object(GenericObject): return source =20 =20 - def generate_deep_copy_code(self, add_banner =3D False): + def generate_deep_copy_code(self, add_banner=3DFalse): source =3D "" =20 if self.extends is not None: diff --git a/tests/cputestdata/cpu-cpuid.py b/tests/cputestdata/cpu-cpuid.py index 43c92731a..c45118512 100755 --- a/tests/cputestdata/cpu-cpuid.py +++ b/tests/cputestdata/cpu-cpuid.py @@ -343,12 +343,12 @@ def convert(path): with open(path, "w") as f: json.dump({"return": {"model": {"name": "base", "props": props}}, "id": "model-expansion"}, - f, indent =3D 2, separators =3D (',', ': ')) + f, indent=3D2, separators=3D(',', ': ')) f.write("\n") =20 for chunk in rest: f.write("\n") - json.dump(chunk, f, indent =3D 2, separators =3D (',', ': ')) + json.dump(chunk, f, indent=3D2, separators=3D(',', ': ')) f.write("\n") =20 =20 diff --git a/tests/cputestdata/cpu-reformat.py b/tests/cputestdata/cpu-refo= rmat.py index 999ef1698..33976e775 100755 --- a/tests/cputestdata/cpu-reformat.py +++ b/tests/cputestdata/cpu-reformat.py @@ -5,5 +5,5 @@ import json =20 dec =3D json.JSONDecoder() data, pos =3D dec.raw_decode(sys.stdin.read()) -json.dump(data, sys.stdout, indent =3D 2, separators =3D (',', ': ')) +json.dump(data, sys.stdout, indent=3D2, separators=3D(',', ': ')) print --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list