[elbe-devel] [PATCH 04/28] pylint: disable more too-many-* messages

Torben Hohn torben.hohn at linutronix.de
Wed Aug 22 11:28:58 CEST 2018


most of them are too-many-branches.
but also too-many-public-methods in a few cases.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/efilesystem.py    | 1 +
 elbepack/elbeproject.py    | 2 ++
 elbepack/elbexml.py        | 8 +++++---
 elbepack/filesystem.py     | 3 +++
 elbepack/hdimg.py          | 4 ++++
 elbepack/pbuilderaction.py | 1 +
 elbepack/projectmanager.py | 3 +++
 elbepack/rfs.py            | 1 +
 elbepack/rpcaptcache.py    | 1 +
 elbepack/updatepkg.py      | 1 +
 10 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/elbepack/efilesystem.py b/elbepack/efilesystem.py
index f8ee8d30..da4bdd21 100644
--- a/elbepack/efilesystem.py
+++ b/elbepack/efilesystem.py
@@ -43,6 +43,7 @@ def copy_filelist(src, filelist, dst):
 def extract_target(src, xml, dst, log, cache):
 
     # pylint: disable=too-many-locals
+    # pylint: disable=too-many-branches
 
     # create filelists describing the content of the target rfs
     if xml.tgt.has("tighten") or xml.tgt.has("diet"):
diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 8fd4541d..a2dffa53 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -416,6 +416,7 @@ class ElbeProject (object):
         # pylint: disable=too-many-arguments
         # pylint: disable=too-many-locals
         # pylint: disable=too-many-statements
+        # pylint: disable=too-many-branches
 
         # Write the log header
         self.write_log_header()
@@ -792,6 +793,7 @@ class ElbeProject (object):
     def install_packages(self, target, buildenv=False):
 
         # pylint: disable=too-many-statements
+        # pylint: disable=too-many-branches
 
         with target:
             # First update the apt cache
diff --git a/elbepack/elbexml.py b/elbepack/elbexml.py
index f6321688..2a495a63 100644
--- a/elbepack/elbexml.py
+++ b/elbepack/elbexml.py
@@ -51,6 +51,9 @@ class ValidationMode():
 
 
 class ElbeXML(object):
+
+    # pylint: disable=too-many-public-methods
+
     def __init__(
             self,
             fname,
@@ -182,13 +185,12 @@ class ElbeXML(object):
 
     def validate_apt_sources(self, url_validation, buildtype):
 
-        # pylint disable=too-many-locals
+        # pylint: disable=too-many-locals
+        # pylint: disable=too-many-branches
 
         slist = self.create_apt_sources_list()
         sources_lines = slist.split('\n')
 
-        # pylint: disable=too-many-locals
-
         repos = []
         for line in sources_lines:
             line = re.sub(r'\[.*\] ', '', line)
diff --git a/elbepack/filesystem.py b/elbepack/filesystem.py
index f8978438..5fd97c60 100644
--- a/elbepack/filesystem.py
+++ b/elbepack/filesystem.py
@@ -46,6 +46,9 @@ def size_to_int(size):
     return int(s) * unit
 
 class Filesystem(object):
+
+    # pylint: disable=too-many-public-methods
+
     def __init__(self, path, clean=False):
         self.path = os.path.abspath(path)
 
diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
index 1704ee24..c7452ddf 100644
--- a/elbepack/hdimg.py
+++ b/elbepack/hdimg.py
@@ -61,6 +61,8 @@ def mkfs_mtd(outf, mtd, fslabel, rfs, target):
 
 def build_image_mtd(outf, mtd, target):
 
+    # pylint: disable=too-many-branches
+
     img_files = []
 
     if not mtd.has("ubivg"):
@@ -465,6 +467,7 @@ def do_image_hd(outf, hd, fslabel, target, grub_version, grub_fw_type):
 
     # pylint: disable=too-many-arguments
     # pylint: disable=too-many-locals
+    # pylint: disable=too-many-branches
 
     sector_size = 512
     s = size_to_int(hd.text("size"))
@@ -566,6 +569,7 @@ def do_hdimg(outf, xml, target, rfs, grub_version, grub_fw_type):
 
     # pylint: disable=too-many-arguments
     # pylint: disable=too-many-locals
+    # pylint: disable=too-many-branches
 
     # list of created files
     img_files = []
diff --git a/elbepack/pbuilderaction.py b/elbepack/pbuilderaction.py
index a822c5ca..3bc12269 100644
--- a/elbepack/pbuilderaction.py
+++ b/elbepack/pbuilderaction.py
@@ -163,6 +163,7 @@ class BuildAction(PBuilderAction):
     def execute(self, opt, _args):
 
         # pylint: disable=too-many-statements
+        # pylint: disable=too-many-branches
 
         tmp = TmpdirFilesystem()
 
diff --git a/elbepack/projectmanager.py b/elbepack/projectmanager.py
index 4ab310ca..b66a1d7a 100644
--- a/elbepack/projectmanager.py
+++ b/elbepack/projectmanager.py
@@ -64,6 +64,9 @@ class OpenProjectFile(object):
 
 
 class ProjectManager(object):
+
+    # pylint: disable=too-many-public-methods
+
     def __init__(self, basepath):
         self.basepath = basepath    # Base path for new projects
         self.db = ElbeDB()          # Database of projects and users
diff --git a/elbepack/rfs.py b/elbepack/rfs.py
index 28f96483..2d565fa3 100644
--- a/elbepack/rfs.py
+++ b/elbepack/rfs.py
@@ -90,6 +90,7 @@ class BuildEnv ():
     def debootstrap(self):
 
         # pylint: disable=too-many-statements
+        # pylint: disable=too-many-branches
 
         cleanup = False
         suite = self.xml.prj.text("suite")
diff --git a/elbepack/rpcaptcache.py b/elbepack/rpcaptcache.py
index 6401b63e..a58f8ed4 100644
--- a/elbepack/rpcaptcache.py
+++ b/elbepack/rpcaptcache.py
@@ -29,6 +29,7 @@ class InChRootObject(object):
 
 
 class RPCAPTCache(InChRootObject):
+    # pylint: disable=too-many-public-methods
     def __init__(
             self,
             rfs,
diff --git a/elbepack/updatepkg.py b/elbepack/updatepkg.py
index d1a0a86b..b41cffe0 100644
--- a/elbepack/updatepkg.py
+++ b/elbepack/updatepkg.py
@@ -38,6 +38,7 @@ def gen_update_pkg(project, xml_filename, upd_filename,
     # pylint: disable=too-many-arguments
     # pylint: disable=too-many-locals
     # pylint: disable=too-many-statements
+    # pylint: disable=too-many-branches
 
     if xml_filename:
         xml = ElbeXML(xml_filename, buildtype=override_buildtype,
-- 
2.11.0




More information about the elbe-devel mailing list