[elbe-devel] [PATCH 62/75] elbeproject: Fix Pylint

Olivier Dion dion at linutronix.de
Mon May 25 17:42:55 CEST 2020


870:0: R1707: (trailing-comma-tuple)
1:0:   C0302: (too-many-lines)
119:0: R0205: (useless-object-inheritance)
447:4: W0102: (dangerous-default-value)
447:4: R0914: (too-many-locals)
447:4: R0912: (too-many-branches)
119:0: R0904: (too-many-public-methods)

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/elbeproject.py | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 8d45469d..18840048 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -8,6 +8,8 @@
 #
 # SPDX-License-Identifier: GPL-3.0-or-later
 
+# pylint: disable=too-many-lines
+
 import os
 import datetime
 import io
@@ -115,10 +117,12 @@ def gen_sdk_scripts(triplet,
 
     return sdkname
 
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
 class ElbeProject (object):
 
     # pylint: disable=too-many-instance-attributes
+    # pylint: disable=too-many-public-methods
 
     def __init__(
             self,
@@ -444,9 +448,15 @@ class ElbeProject (object):
         # pdebuild_build(-1) means use all cpus
         self.pdebuild_build(cpuset=-1, profile="", cross=False)
 
+    # tgt_pkg_lst is read-only; This is not dangerous
+    # pylint: disable=dangerous-default-value
     def build_cdroms(self, build_bin=True,
                      build_sources=False, cdrom_size=None,
                      tgt_pkg_lst=[]):
+
+        # pylint: disable=too-many-branches
+        # pylint: disable=too-many-locals
+
         self.repo_images = []
 
         env = None
@@ -867,7 +877,7 @@ class ElbeProject (object):
             env = self.buildenv
 
         if norecommend is None:
-            norecommend = not self.xml.prj.has('install-recommends'),
+            norecommend = not self.xml.prj.has('install-recommends')
 
         if env.arch == "default":
             arch = self.arch
-- 
2.26.2




More information about the elbe-devel mailing list