[elbe-devel] [PATCH 12/40] pylint: ignore apt_pkg.Cache is not iteratable

Torben Hohn torben.hohn at linutronix.de
Thu Sep 20 11:28:57 CEST 2018


On Fri, Sep 14, 2018 at 01:56:24PM +0200, Manuel Traut wrote:
> apt_pkg.Cache is definitely iterateable. Ignore the error.
> It can't be ignored by 'not-aniterable' so use the error code instead.

typo ? not-an-iterable (E1133)

> 
> Signed-off-by: Manuel Traut <manut at linutronix.de>

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

> ---
>  elbepack/commands/pkgdiff.py | 2 ++
>  elbepack/virtapt.py          | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/elbepack/commands/pkgdiff.py b/elbepack/commands/pkgdiff.py
> index 38b13112..59387302 100644
> --- a/elbepack/commands/pkgdiff.py
> +++ b/elbepack/commands/pkgdiff.py
> @@ -57,6 +57,7 @@ def run_command(argv):
>  
>      gen_pkgs = {}
>      for p in gen_cache.packages:
> +        # pylint: disable=E1133
>          if opt.noauto:
>              if p.current_ver and not \
>                 gc[p.name].is_auto_installed and not \
> @@ -75,6 +76,7 @@ def run_command(argv):
>  
>      fix_pkgs = {}
>      for p in fix_cache.packages:
> +        # pylint: disable=E1133
>          if opt.noauto:
>              if p.current_ver and not \
>                 fc[p.name].is_auto_installed and not \
> diff --git a/elbepack/virtapt.py b/elbepack/virtapt.py
> index 3aac138c..7bff22c6 100644
> --- a/elbepack/virtapt.py
> +++ b/elbepack/virtapt.py
> @@ -250,6 +250,7 @@ class VirtApt(object):
>                  c = None
>              if not c:
>                  for p in self.cache.packages:
> +                    # pylint: disable=E1133
>                      for x in p.provides_list:
>                          if pp == x[0]:
>                              pkg = self.cache[x[2].parent_pkg.name]
> -- 
> 2.19.0.rc2
> 

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20180920/c2a24668/attachment.sig>


More information about the elbe-devel mailing list