[elbe-devel] [PATCH 56/75] log: Fix Pylint

Torben Hohn torben.hohn at linutronix.de
Fri May 29 16:44:01 CEST 2020


On Mon, May 25, 2020 at 11:42:49AM -0400, Olivier Dion wrote:
> 87:21: W0212: (protected-access)
> 219:0: R0205: (useless-object-inheritance)
> 266:8: C0200: (consider-using-enumerate)
> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>

Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>

> ---
>  elbepack/log.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/elbepack/log.py b/elbepack/log.py
> index f17df9e7..6556733c 100644
> --- a/elbepack/log.py
> +++ b/elbepack/log.py
> @@ -84,6 +84,8 @@ class ThreadFilter(logging.Filter):
>  
>      def filter(self, record):
>          if hasattr(record, '_thread'):
> +            # Hack to fake logging for another thread
> +            # pylint: disable=protected-access
>              thread = record._thread
>          else:
>              thread = record.thread
> @@ -215,7 +217,8 @@ def close_logging():
>              root.removeHandler(h)
>      local.handlers = []
>  
> -
> +# TODO:py3 Remove object inheritance
> +# pylint: disable=useless-object-inheritance
>  class AsyncLogging(object):
>  
>      def __init__(self, atmost, stream, block):
> @@ -263,6 +266,7 @@ class AsyncLogging(object):
>          buff = rest + os.read(self.fd, self.atmost)
>          j = 0
>          count = 0
> +        # pylint: disable=consider-using-enumerate
>          for i in range(len(buff)):
>              if buff[i] == '\n':
>                  self.lines.append(buff[j:i])
> -- 
> 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