From nobody Sat Jul 5 16:15:56 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 1521528610081802.9322403700326; Mon, 19 Mar 2018 23:50:10 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 80556804F8; Tue, 20 Mar 2018 06:50:08 +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 49B9E5D731; Tue, 20 Mar 2018 06:50:08 +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 0A19E4CAAF; Tue, 20 Mar 2018 06:50:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2K6ngII019474 for ; Tue, 20 Mar 2018 02:49:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 209E05D962; Tue, 20 Mar 2018 06:49:42 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 19FD65DA62 for ; Tue, 20 Mar 2018 06:49:42 +0000 (UTC) Received: from mail-wr0-f182.google.com (mail-wr0-f182.google.com [209.85.128.182]) (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 2C11D23E6C9 for ; Tue, 20 Mar 2018 06:49:40 +0000 (UTC) Received: by mail-wr0-f182.google.com with SMTP id l8so463646wrg.5 for ; Mon, 19 Mar 2018 23:49:40 -0700 (PDT) Received: from rst.Home ([2a02:c7d:692a:c500:1ebc:73f3:5f60:b131]) by smtp.gmail.com with ESMTPSA id g38sm1923269wra.77.2018.03.19.23.49.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Mar 2018 23:49:37 -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=EQX8pYv40vKtvewHd77Py7mx5quF6wH4+X1Ar6adGG8=; b=e+TKyN5aKIHovWvU0ssp4Cz7TjoL4XGHRpcOUq9JkUjL/W4mbEfn8dGQ8hHb3A8TVR 69v7PQLpDt9OJMVLWGp5oeDZwQ50cg7B9IvZ3kBmtbyGAj9iPH6Y3K2yisI14HLofGhD p7BjeWPygU+QnxNMjgs2CRtRkBTBxRXFvVVCKKpZFPXESmlxx+ZFuXCUkPwYZ1DDFcHn nEi+6ALktVsThcymCEtgVzmUoFnqwF4RlPMTdgJjnae5LwhgZmKEhiW1Dj4S9jipaCpA O1GMZv4Cgd2xs9IsuHq1HjlnF5fTNQs4vSRzWCjaRLRcroPNXxs+B8rOZHYmEkDtztgs gb7Q== 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=EQX8pYv40vKtvewHd77Py7mx5quF6wH4+X1Ar6adGG8=; b=gedxp44lGG/UNPUgBBYuIhvZbh57rN8ZnFw04ryG3zZgxJBDKVx9BArkcOXYDjdmAs LHogPt2cIz6Vf7StVzve4bTEUxvRV0VQspM2J+u5depTd3xW/DsPoWzyl9VegPWHcIYM u9nGLquhBbeKSr4jPbyLGAR0InvNmBr4RhhULGtQdz72odJumB2V5hLekeMxzx2CLQwB /z2z2fGN4N1IPY3IltmyWeYdn3rpJOKGFwFrJXATXCKr7H6aGzhNVTz/dRoACVC6lBxt SNM6jNnVZWSJLVAexeQTOVaTymn/xGlHaswvkt0Vp+WdMiy9sW7j4bpuML2uCqPN0gk4 HeLw== X-Gm-Message-State: AElRT7H5YjedPPiHmlRwMCYAtj0f397rUzXY22jrdtno60kyQ1qHKtJy KEKKCyrLLAgc0twEeCk0XveOAdRI X-Google-Smtp-Source: AG47ELsi+vlCWWp0MvX/9G+LEQllE2sWA4T9L8cGaNt8nJ90pZFY0o+mBjkdL2g7QiTjX+K3wYnURg== X-Received: by 10.223.151.193 with SMTP id t1mr1500798wrb.206.1521528578396; Mon, 19 Mar 2018 23:49:38 -0700 (PDT) From: Radostin Stoyanov To: libvir-list@redhat.com Date: Tue, 20 Mar 2018 06:48:54 +0000 Message-Id: <20180320064908.17723-12-rstoyanov1@gmail.com> In-Reply-To: <20180320064908.17723-1-rstoyanov1@gmail.com> References: <20180320064908.17723-1-rstoyanov1@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 20 Mar 2018 06:49:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 20 Mar 2018 06:49:40 +0000 (UTC) for IP:'209.85.128.182' DOMAIN:'mail-wr0-f182.google.com' HELO:'mail-wr0-f182.google.com' FROM:'rstoyanov1@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.139 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.128.182 mail-wr0-f182.google.com 209.85.128.182 mail-wr0-f182.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Radostin Stoyanov Subject: [libvirt] [PATCHv2 11/25] 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 20 Mar 2018 06:50:09 +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 --- 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 51df9dc30..50ddf372d 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 @@ -629,7 +629,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 @@ -661,7 +661,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) @@ -670,7 +670,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) @@ -763,7 +763,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 @@ -808,7 +808,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 '__': @@ -885,7 +885,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 31bd10fb1..28d440a6d 100755 --- a/src/esx/esx_vi_generator.py +++ b/src/esx/esx_vi_generator.py @@ -119,7 +119,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) @@ -610,7 +610,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