[elbe-devel] [PATCH 59/75] aptprogress: Fix Pylint
Torben Hohn
torben.hohn at linutronix.de
Fri May 29 16:55:55 CEST 2020
On Mon, May 25, 2020 at 11:42:52AM -0400, Olivier Dion wrote:
> 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
mmmm... these are class attributes in
/usr/lib/python3/dist-packages/apt/progress/base.py
seems like the tuple assignment confuses pylint.
Please adjust the comment.
>
> 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
>
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
--
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/kontakt/Datenschutz.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
More information about the elbe-devel
mailing list