[elbe-devel] [PATCH 62/75] elbeproject: Fix Pylint
Torben Hohn
torben.hohn at linutronix.de
Fri May 29 16:57:54 CEST 2020
On Mon, May 25, 2020 at 11:42:55AM -0400, Olivier Dion wrote:
> 870:0: R1707: (trailing-comma-tuple)
> 1:0: C0302: (too-many-lines)
> 119:0: R0205: (useless-object-inheritance)
> 447:4: W0102: (dangerous-default-value)
> 447:4: R0914: (too-many-locals)
> 447:4: R0912: (too-many-branches)
> 119:0: R0904: (too-many-public-methods)
>
> Signed-off-by: Olivier Dion <dion at linutronix.de>
> ---
> elbepack/elbeproject.py | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
> index 8d45469d..18840048 100644
> --- a/elbepack/elbeproject.py
> +++ b/elbepack/elbeproject.py
> @@ -8,6 +8,8 @@
> #
> # SPDX-License-Identifier: GPL-3.0-or-later
>
> +# pylint: disable=too-many-lines
> +
> import os
> import datetime
> import io
> @@ -115,10 +117,12 @@ def gen_sdk_scripts(triplet,
>
> return sdkname
>
> -
> +# TODO:py3 Remove object inheritance
> +# pylint: disable=useless-object-inheritance
> class ElbeProject (object):
>
> # pylint: disable=too-many-instance-attributes
> + # pylint: disable=too-many-public-methods
>
> def __init__(
> self,
> @@ -444,9 +448,15 @@ class ElbeProject (object):
> # pdebuild_build(-1) means use all cpus
> self.pdebuild_build(cpuset=-1, profile="", cross=False)
>
> + # tgt_pkg_lst is read-only; This is not dangerous
> + # pylint: disable=dangerous-default-value
its a bad pattern, please fix it anyways.
then:
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
> def build_cdroms(self, build_bin=True,
> build_sources=False, cdrom_size=None,
> tgt_pkg_lst=[]):
> +
> + # pylint: disable=too-many-branches
> + # pylint: disable=too-many-locals
> +
> self.repo_images = []
>
> env = None
> @@ -867,7 +877,7 @@ class ElbeProject (object):
> env = self.buildenv
>
> if norecommend is None:
> - norecommend = not self.xml.prj.has('install-recommends'),
> + norecommend = not self.xml.prj.has('install-recommends')
>
> if env.arch == "default":
> arch = self.arch
> --
> 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