[elbe-devel] [PATCH v2 44/66] virtapt: Fix Pylint

Olivier Dion dion at linutronix.de
Fri Jun 5 19:07:08 CEST 2020


25:0:   W0404: (reimported)
78:0:   R0205: (useless-object-inheritance)
79:4:   R0915: (too-many-statements)
181:4:  R0201: (no-self-use)
249:20: E1101: (no-member)
14:0:   W0611: (unused-import)
25:0:   W0611: (unused-import)
27:0:   W0611: (unused-import)
25:0:   C0412: (ungrouped-imports)

Signed-off-by: Olivier Dion <dion at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/virtapt.py | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/elbepack/virtapt.py b/elbepack/virtapt.py
index f74facd0..3ad0d129 100644
--- a/elbepack/virtapt.py
+++ b/elbepack/virtapt.py
@@ -11,9 +11,6 @@ from __future__ import print_function
 import os
 import sys
 
-from multiprocessing.managers import BaseManager
-
-from elbepack.shellhelper import system
 
 # don't remove the apt import, it is really needed, due to some magic in
 # apt_pkg
@@ -22,9 +19,8 @@ import apt  # pylint: disable=unused-import
 import apt_pkg
 
 
-from elbepack.shellhelper import CommandError, system
+from elbepack.shellhelper import system
 from elbepack.filesystem import TmpdirFilesystem
-from elbepack.xmldefaults import ElbeDefaults
 from elbepack.rfs import create_apt_prefs
 
 
@@ -74,10 +70,12 @@ def lookup_uri(v, d, target_pkg):
 
     return target_pkg, uri, hashval
 
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
 class VirtApt(object):
     def __init__(self, xml):
 
+        # pylint: disable=too-many-statements
         self.xml = xml
 
         arch = xml.text("project/buildimage/arch", key="arch")
@@ -178,7 +176,8 @@ class VirtApt(object):
     def stop(self):
         pass
 
-    def pulse(self, _obj):
+    @staticmethod
+    def pulse(_obj):
         return True
 
     def initialize_dirs(self):
@@ -246,7 +245,7 @@ class VirtApt(object):
 
     def get_downloaded_files(self):
         ret = []
-        for _, d in self.downloads.iteritems():
+        for _, d in self.downloads.items():
             if d.complete:
                 ret.append(d.destfile)
             else:
-- 
2.27.0




More information about the elbe-devel mailing list