[elbe-devel] [PATCH v2 02/12] finetuning: Fix Pylint

Torben Hohn torben.hohn at linutronix.de
Thu Jul 22 17:10:02 CEST 2021


From: Christian Teklenborg <chris at linutronix.de>

511:12: W1201: (Specify string format arguments as logging function parameters)
507:22: W0613: (Unused argument 'buildenv')
518:12: W1201: (Specify string format arguments as logging function parameters)
514:44: W0613: (Unused argument 'builddir')
709:37: W0613: (Unused argument 'target')
709:45: W0613: (Unused argument 'builddir')

Signed-off-by: Christian Teklenborg <chris at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/finetuning.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/elbepack/finetuning.py b/elbepack/finetuning.py
index 01c98d820..9a2fcf075 100644
--- a/elbepack/finetuning.py
+++ b/elbepack/finetuning.py
@@ -504,18 +504,18 @@ class ArtifactAction(FinetuningAction):
     def __init__(self, node):
         FinetuningAction.__init__(self, node)
 
-    def execute(self, buildenv, target):
+    def execute(self, _buildenv, target):
         if os.path.isfile("../target/" + self.node.et.text):
             target.images.append('target' + self.node.et.text)
         else:
-            logging.error("The specified artifact: '%s' doesn't exist" %
+            logging.error("The specified artifact: '%s' doesn't exist",
                            self.node.et.text)
 
-    def execute_prj(self, buildenv, target, builddir):
+    def execute_prj(self, _buildenv, target, _builddir):
         if os.path.isfile("../" + self.node.et.text):
             target.images.append(self.node.et.text)
         else:
-            logging.error("The specified artifact: '%s' doesn't exist" %
+            logging.error("The specified artifact: '%s' doesn't exist",
                            self.node.et.text)
 
 
@@ -706,7 +706,7 @@ class SetPartitionTypeAction(ImageFinetuningAction):
         raise NotImplementedError("<set_partition_type> may only be "
                                   "used in <losetup>")
 
-    def execute_img(self, _buildenv, target, builddir, loop_dev):
+    def execute_img(self, _buildenv, _target, _builddir, loop_dev):
         part_nr = self.node.et.attrib['part']
         part_type = self.node.et.attrib['type']
 
-- 
2.20.1



More information about the elbe-devel mailing list