[elbe-devel] [PATCH 11/16] elbeproject: fix pylint

Bastian Germann bage at linutronix.de
Wed Jul 28 19:28:27 CEST 2021


Am 28.07.21 um 17:40 schrieb Torben Hohn:
> elbepack/elbeproject.py:780:0: W0311: Bad indentation. Found 24 spaces, expected 20 (bad-indentation)
> elbepack/elbeproject.py:781:0: W0311: Bad indentation. Found 24 spaces, expected 20 (bad-indentation)
> elbepack/elbeproject.py:763:53: R1714: Consider merging these comparisons with "in" to "i in ('nodoc', 'nocheck')" (consider-using-
> in)
> elbepack/elbeproject.py:982:8: W0612: Unused variable 'source' (unused-variable)
> 
> Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>

With quotes fixed:
Reviewed-by: Bastian Germann <bage at linutronix.de>

> ---
>   elbepack/elbeproject.py | 11 +++++------
>   1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
> index ae0a2d089..a23e13e69 100644
> --- a/elbepack/elbeproject.py
> +++ b/elbepack/elbeproject.py
> @@ -760,7 +760,7 @@ class ElbeProject:
>               cpuset_cmd = ''
>   
>           profile_list = profile.split(",")
> -        deb_build_opts = [i for i in profile_list if i=="nodoc" or i=="nocheck"]
> +        deb_build_opts = [i for i in profile_list if i in ("nodoc", "nocheck")]
>   
>           pdebuilder_current = os.path.join(self.builddir, "pdebuilder", "current")
>   
> @@ -777,10 +777,10 @@ class ElbeProject:
>           else:
>               try:
>                   for orig_fname in self.orig_files:
> -                        ofname = os.path.join(self.builddir, orig_fname)
> -                        do('mv "%s" "%s"' % (ofname,
> -                                             os.path.join(self.builddir,
> -                                                          "pdebuilder")))
> +                    ofname = os.path.join(self.builddir, orig_fname)
> +                    do('mv "%s" "%s"' % (ofname,
> +                                         os.path.join(self.builddir,
> +                                                      "pdebuilder")))
>               finally:
>                   self.orig_fname = None
>                   self.orig_files = []
> @@ -979,7 +979,6 @@ class ElbeProject:
>                        datetime.datetime.now().strftime("%Y%m%d-%H%M%S"))
>   
>       def copy_initvmnode(self):
> -        source = self.xml
>           source_path = "/var/cache/elbe/source.xml"
>           try:
>               initxml = ElbeXML(source_path,
> 


More information about the elbe-devel mailing list