[elbe-devel] [PATCH 59/75] aptprogress: Fix Pylint

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


24:12: W0201: (attribute-defined-outside-init)
53:12: W0201: (attribute-defined-outside-init)
95:20: W0613: (unused-argument)
95:4:  R0201: (no-self-use)

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/aptprogress.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/elbepack/aptprogress.py b/elbepack/aptprogress.py
index 8118c262..6097b159 100644
--- a/elbepack/aptprogress.py
+++ b/elbepack/aptprogress.py
@@ -21,6 +21,8 @@ class ElbeInstallProgress (InstallProgress):
 
     def write(self, line):
         if line == 'update finished':
+            # This is used internally by InstallProgress
+            # pylint: disable=attribute-defined-outside-init
             self.percent = 100
 
         line = str(self.percent) + "% " + line
@@ -50,6 +52,8 @@ class ElbeInstallProgress (InstallProgress):
     def fork(self):
         retval = os.fork()
         if retval:
+            # This is used internally by InstallProgress
+            # pylint: disable=attribute-defined-outside-init
             self.child_pid = retval
         return retval
 
@@ -92,7 +96,8 @@ class ElbeAcquireProgress (AcquireProgress):
 
         self.write(line)
 
-    def pulse(self, owner):
+    @staticmethod
+    def pulse(_owner):
         return True
 
 
-- 
2.26.2




More information about the elbe-devel mailing list