[elbe-devel] [PATCH 11/40] pylint: remove/annotate unused imports

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


On Fri, Sep 14, 2018 at 01:56:23PM +0200, Manuel Traut wrote:
> debianize.py:     annotate unused imports they are needed
> xmldefaults.py:   remove unused import string
> xmlpreprocess.py: remove unused import re
> 
> Signed-off-by: Manuel Traut <manut at linutronix.de>

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

> ---
>  elbepack/debianize/debianize.py | 12 ++++--------
>  elbepack/xmldefaults.py         |  1 -
>  elbepack/xmlpreprocess.py       |  1 -
>  3 files changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/elbepack/debianize/debianize.py b/elbepack/debianize/debianize.py
> index efabf72e..3cb92b39 100644
> --- a/elbepack/debianize/debianize.py
> +++ b/elbepack/debianize/debianize.py
> @@ -5,15 +5,11 @@
>  
>  from npyscreen import NPSAppManaged
>  
> -# don't remove these imports; even if pylint, etc believes they are unused
> -#
> -# pylint: disable=unused-import

weird... this had worked with my pylint version.

> -
> -from elbepack.debianize.kernel import Kernel
> -from elbepack.debianize.uboot import UBoot
> -from elbepack.debianize.barebox import BareBox
> +from elbepack.debianize.kernel import Kernel   #pylint: disable=unused-import
> +from elbepack.debianize.uboot import UBoot     #pylint: disable=unused-import
> +from elbepack.debianize.barebox import BareBox #pylint: disable=unused-import
>  
> -from elbepack.debianize.base import DebianizeBase
> +from elbepack.debianize.base import DebianizeBase #pylint: disable=unused-import
>  
>  
>  class Debianize (NPSAppManaged):
> diff --git a/elbepack/xmldefaults.py b/elbepack/xmldefaults.py
> index 1c58b21d..a42df002 100644
> --- a/elbepack/xmldefaults.py
> +++ b/elbepack/xmldefaults.py
> @@ -9,7 +9,6 @@
>  from __future__ import print_function
>  
>  import random
> -import string
>  import sys
>  
>  from elbepack.kvm import find_kvm_exe
> diff --git a/elbepack/xmlpreprocess.py b/elbepack/xmlpreprocess.py
> index 0c6b4902..fdbaee3f 100644
> --- a/elbepack/xmlpreprocess.py
> +++ b/elbepack/xmlpreprocess.py
> @@ -5,7 +5,6 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  
>  import sys
> -import re
>  from lxml import etree
>  from lxml.etree import XMLParser, parse
>  from elbepack.archivedir import ArchivedirError, combinearchivedir
> -- 
> 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/fdb9d231/attachment.sig>


More information about the elbe-devel mailing list