[elbe-devel] [PATCH 40/75] repomanager: Fix Pylint

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


23:0:   R0205: (useless-object-inheritance)
53:0:   R0205: (useless-object-inheritance)
227:33: W0613: (unused-argument)
236:40: E0602: (undefined-variable)
235:30: W0613: (unused-argument)
241:40: E0602: (undefined-variable)
240:38: W0613: (unused-argument)
12:0:   W0611: (unused-import)

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/repomanager.py | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/elbepack/repomanager.py b/elbepack/repomanager.py
index 909d13ea..bce55830 100644
--- a/elbepack/repomanager.py
+++ b/elbepack/repomanager.py
@@ -9,7 +9,6 @@
 
 import os
 import shutil
-import logging
 
 from debian.deb822 import Deb822
 
@@ -19,7 +18,8 @@ from elbepack.pkgutils import get_dsc_size
 from elbepack.egpg import generate_elbe_internal_key, export_key, unlock_key
 from elbepack.shellhelper import CommandError, do
 
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
 class RepoAttributes(object):
     def __init__(self, codename, arch, components,
                  mirror='http://ftp.de.debian.org/debian'):
@@ -49,7 +49,8 @@ class RepoAttributes(object):
 
         return [RepoAttributes(self.codename, ret_arch, ret_comp, self.mirror)]
 
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
 class RepoBase(object):
 
     # pylint: disable=too-many-instance-attributes
@@ -224,7 +225,7 @@ class RepoBase(object):
         do(cmd % (self.fs.path, codename, pkgname),
            env_add={'GNUPGHOME': '/var/cache/elbe/gnupg'})
 
-    def removedeb(self, pkgname, component="main"):
+    def removedeb(self, pkgname, _component="main"):
         self._removedeb(pkgname, self.repo_attr.codename)
 
     def _removesrc(self, srcname, codename):
@@ -232,12 +233,14 @@ class RepoBase(object):
         do(cmd % (self.fs.path, codename, srcname),
            env_add={'GNUPGHOME': '/var/cache/elbe/gnupg'})
 
-    def removesrc(self, path, component="main"):
+    def removesrc(self, path, _component="main"):
+        # pylint: disable=undefined-variable
         for p in Deb822.iter_paragraphs(file(path)):
             if 'Source' in p:
                 self._removesrc(p['Source'], self.repo_attr.codename)
 
-    def _remove(self, path, codename, component):
+    def _remove(self, path, codename, _component):
+        # pylint: disable=undefined-variable
         for p in Deb822.iter_paragraphs(file(path)):
             if 'Source' in p:
                 self._removesrc(p['Source'], codename)
-- 
2.26.2




More information about the elbe-devel mailing list