[elbe-devel] [PATCH 42/75] elbexml: Fix Pylint

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


49:0:  R0205: (useless-object-inheritance)
63:0:  R0205: (useless-object-inheritance)
184:4: R0201: (no-self-use)
213:4: R0915: (too-many-statements)

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/elbexml.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/elbepack/elbexml.py b/elbepack/elbexml.py
index fa815839..6496e442 100644
--- a/elbepack/elbexml.py
+++ b/elbepack/elbexml.py
@@ -45,7 +45,8 @@ class ValidationError(Exception):
 class NoInitvmNode(Exception):
     pass
 
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
 class ValidationMode(object):
     NO_CHECK = 1
     CHECK_BINARIES = 2
@@ -59,7 +60,8 @@ def replace_localmachine(mirror, initvm=True):
 
     return mirror.replace("LOCALMACHINE", localmachine)
 
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
 class ElbeXML(object):
 
     # pylint: disable=too-many-public-methods
@@ -181,7 +183,9 @@ class ElbeXML(object):
 
         return replace_localmachine(mirror, initvm)
 
-    def validate_repo(self, r):
+    @staticmethod
+    def validate_repo(r):
+        # pylint: disable=too-many-statements
         try:
             fp = urlopen(r["url"] + "InRelease", None, 10)
         except URLError:
@@ -214,6 +218,7 @@ class ElbeXML(object):
 
         # pylint: disable=too-many-locals
         # pylint: disable=too-many-branches
+        # pylint: disable=too-many-statements
 
         slist = self.create_apt_sources_list()
         sources_lines = slist.split('\n')
-- 
2.26.2




More information about the elbe-devel mailing list