[elbe-devel] [PATCH v2 51/66] aptprogress: Fix Pylint
Olivier Dion
dion at linutronix.de
Fri Jun 5 19:07:15 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 | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/elbepack/aptprogress.py b/elbepack/aptprogress.py
index 8118c262..2b8d4185 100644
--- a/elbepack/aptprogress.py
+++ b/elbepack/aptprogress.py
@@ -21,6 +21,11 @@ class ElbeInstallProgress (InstallProgress):
def write(self, line):
if line == 'update finished':
+ # This is class attribute inherited by InstallProgress.
+ # Pylint is confused by this but the attribute does exists
+ # on this type!
+ #
+ # pylint: disable=attribute-defined-outside-init
self.percent = 100
line = str(self.percent) + "% " + line
@@ -50,6 +55,11 @@ class ElbeInstallProgress (InstallProgress):
def fork(self):
retval = os.fork()
if retval:
+ # This is class attribute inherited by InstallProgress.
+ # Pylint is confused by this but the attribute does exists
+ # on this type!
+ #
+ # pylint: disable=attribute-defined-outside-init
self.child_pid = retval
return retval
@@ -92,7 +102,8 @@ class ElbeAcquireProgress (AcquireProgress):
self.write(line)
- def pulse(self, owner):
+ @staticmethod
+ def pulse(_owner):
return True
--
2.27.0
More information about the elbe-devel
mailing list