[elbe-devel] [PATCH v2 51/66] aptprogress: Fix Pylint

Torben Hohn torben.hohn at linutronix.de
Wed Jun 10 13:53:42 CEST 2020


On Fri, Jun 05, 2020 at 01:07:15PM -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>

Reviewed-by: Torben Hohn <torben.hohn 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
> 
> 
> _______________________________________________
> 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