[elbe-devel] [PATCH 42/75] elbexml: Fix Pylint
Torben Hohn
torben.hohn at linutronix.de
Fri May 29 12:58:54 CEST 2020
On Mon, May 25, 2020 at 11:42:35AM -0400, Olivier Dion wrote:
> 49:0: R0205: (useless-object-inheritance)
> 63:0: R0205: (useless-object-inheritance)
> 184:4: R0201: (no-self-use)
> 213:4: R0915: (too-many-statements)
>
> Signed-off-by: Olivier Dion <dion at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
> ---
> elbepack/elbexml.py | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/elbepack/elbexml.py b/elbepack/elbexml.py
> index fa815839..6496e442 100644
> --- a/elbepack/elbexml.py
> +++ b/elbepack/elbexml.py
> @@ -45,7 +45,8 @@ class ValidationError(Exception):
> class NoInitvmNode(Exception):
> pass
>
> -
> +# TODO:py3 Remove object inheritance
> +# pylint: disable=useless-object-inheritance
> class ValidationMode(object):
> NO_CHECK = 1
> CHECK_BINARIES = 2
> @@ -59,7 +60,8 @@ def replace_localmachine(mirror, initvm=True):
>
> return mirror.replace("LOCALMACHINE", localmachine)
>
> -
> +# TODO:py3 Remove object inheritance
> +# pylint: disable=useless-object-inheritance
> class ElbeXML(object):
>
> # pylint: disable=too-many-public-methods
> @@ -181,7 +183,9 @@ class ElbeXML(object):
>
> return replace_localmachine(mirror, initvm)
>
> - def validate_repo(self, r):
> + @staticmethod
> + def validate_repo(r):
> + # pylint: disable=too-many-statements
> try:
> fp = urlopen(r["url"] + "InRelease", None, 10)
> except URLError:
> @@ -214,6 +218,7 @@ class ElbeXML(object):
>
> # pylint: disable=too-many-locals
> # pylint: disable=too-many-branches
> + # pylint: disable=too-many-statements
>
> slist = self.create_apt_sources_list()
> sources_lines = slist.split('\n')
> --
> 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