[elbe-devel] [PATCH 20/75] debianize panels base: Fix Pylint

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


22:0: R0205: (useless-object-inheritance)
31:0: R0205: (useless-object-inheritance)
37:0: R0205: (useless-object-inheritance)
83:8: R1705: (no-else-return)

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/debianize/panels/base.py | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/elbepack/debianize/panels/base.py b/elbepack/debianize/panels/base.py
index a350e33f..5555437d 100644
--- a/elbepack/debianize/panels/base.py
+++ b/elbepack/debianize/panels/base.py
@@ -18,7 +18,8 @@ from elbepack.debianize.widgets.radio import RadioGroup
 
 from elbepack.templates import template
 
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
 class Arch(object):
     ARM64 = "arm64"
     ARMHF = "armhf"
@@ -27,13 +28,15 @@ class Arch(object):
     I386  = "i386"
     POWER = "powerpc"
 
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
 class Format(object):
     NATIVE = "native"
     GIT = "git"
     QUILT = "quilt"
 
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
 class Release(object):
     STABLE = "stable"
     OLDSTABLE = "oldstable"
@@ -80,14 +83,12 @@ class Panel(Form):
     def get_k_arch(self):
         """ get_k_arch() may be used in debianize() """
 
-        if self.deb['p_arch'] == 'armhf':
-            return 'arm'
-        elif self.deb['p_arch'] == 'armel':
-            return 'arm'
-        elif self.deb['p_arch'] == 'amd64':
+        if self.deb['p_arch'] in ("armhf", "armel"):
+            return "arm"
+        if self.deb['p_arch'] == 'amd64':
             return 'x86_64'
-        else:
-            return self.deb['p_arch']
+
+        return self.deb['p_arch']
 
     def on_submit(self, datas):
 
-- 
2.26.2




More information about the elbe-devel mailing list