[elbe-devel] [PATCH 33/37] Rework import order

Eduard Krein eduard.krein at linutronix.de
Wed Feb 7 16:34:50 CET 2024


Am Mittwoch, dem 07.02.2024 um 15:29 +0100 schrieb Benedikt Spranger:
> PEP8 states:
> "Imports should be grouped in the following order:
> 
> 1. Standard library imports.
> 2. Related third party imports.
> 3. Local application/library specific imports.
> 
> You should put a blank line between each group of imports."
> 
> Rework imports to match PEP8 rules.
> No functional change.
> 
> Signed-off-by: Benedikt Spranger <b.spranger at linutronix.de>
Reviewed-by: Eduard Krein <eduard.krein at linutronix.de>
> ---
>  elbe                                    |  3 +-
>  elbepack/aptpkgutils.py                 |  2 +-
>  elbepack/aptprogress.py                 |  3 +-
>  elbepack/archivedir.py                  |  8 ++--
>  elbepack/asyncworker.py                 | 16 ++++----
>  elbepack/cdroms.py                      | 13 +++----
>  elbepack/commands/add.py                |  1 -
>  elbepack/commands/adjustpkgs.py         |  2 +-
>  elbepack/commands/bootup-check.py       |  1 +
>  elbepack/commands/buildchroot.py        | 14 +++----
>  elbepack/commands/buildsdk.py           |  4 +-
>  elbepack/commands/buildsysroot.py       |  2 +-
>  elbepack/commands/check-build.py        |  9 +++--
>  elbepack/commands/check_updates.py      |  9 ++---
>  elbepack/commands/chg_archive.py        |  1 -
>  elbepack/commands/chroot.py             |  8 ++--
>  elbepack/commands/control.py            | 11 +++---
>  elbepack/commands/diff.py               |  3 +-
>  elbepack/commands/fetch_initvm_pkgs.py  | 14 +++----
>  elbepack/commands/gen_update.py         |  8 ++--
>  elbepack/commands/genlicence.py         |  6 +--
>  elbepack/commands/get_archive.py        |  1 -
>  elbepack/commands/hdimg.py              |  3 +-
>  elbepack/commands/init.py               | 21 +++++-----
>  elbepack/commands/initvm.py             |  4 +-
>  elbepack/commands/mkcdrom.py            | 11 +++---
>  elbepack/commands/parselicence.py       | 11 +++---
>  elbepack/commands/pbuilder.py           |  2 +-
>  elbepack/commands/pin_versions.py       |  1 -
>  elbepack/commands/pkgdiff.py            |  2 +-
>  elbepack/commands/preprocess.py         |  3 +-
>  elbepack/commands/prjrepo.py            | 11 +++---
>  elbepack/commands/repodir.py            |  4 +-
>  elbepack/commands/setsel.py             |  1 -
>  elbepack/commands/show.py               |  1 -
>  elbepack/commands/test.py               |  4 +-
>  elbepack/commands/toolchainextract.py   | 11 +++---
>  elbepack/commands/updated.py            |  6 +--
>  elbepack/commands/validate.py           |  5 ++-
>  elbepack/commands/xsdtoasciidoc.py      |  3 +-
>  elbepack/daemons/soap/__init__.py       |  8 ++--
>  elbepack/daemons/soap/authentication.py |  2 +-
>  elbepack/daemons/soap/datatypes.py      |  2 +-
>  elbepack/daemons/soap/esoap.py          | 21 +++++-----
>  elbepack/daemons/soap/faults.py         | 12 +++---
>  elbepack/db.py                          | 41 +++++++++++---------
>  elbepack/dbaction.py                    |  4 +-
>  elbepack/debinstaller.py                | 13 +++----
>  elbepack/debpkg.py                      |  1 -
>  elbepack/directories.py                 |  1 -
>  elbepack/dump.py                        |  9 ++---
>  elbepack/efilesystem.py                 | 18 ++++-----
>  elbepack/egpg.py                        |  9 +++--
>  elbepack/elbeproject.py                 | 51 ++++++++++++-----------
> --
>  elbepack/elbexml.py                     | 14 ++++---
>  elbepack/filesystem.py                  |  7 ++--
>  elbepack/finetuning.py                  | 22 +++++------
>  elbepack/fstab.py                       |  2 +-
>  elbepack/hashes.py                      |  3 +-
>  elbepack/hdimg.py                       |  8 ++--
>  elbepack/initvmaction.py                | 15 ++++----
>  elbepack/licencexml.py                  | 12 ++++--
>  elbepack/log.py                         |  4 +-
>  elbepack/packers.py                     |  1 +
>  elbepack/pbuilder.py                    |  1 -
>  elbepack/pbuilderaction.py              |  4 +-
>  elbepack/pkgarchive.py                  |  6 ++-
>  elbepack/pkgutils.py                    |  1 +
>  elbepack/projectmanager.py              | 29 ++++++++------
>  elbepack/repodir.py                     |  5 +--
>  elbepack/repomanager.py                 |  2 +-
>  elbepack/rfs.py                         |  8 ++--
>  elbepack/rpcaptcache.py                 | 23 +++++++----
>  elbepack/shellhelper.py                 |  8 ++--
>  elbepack/soapclient.py                  | 19 +++++----
>  elbepack/templates.py                   |  8 ++--
>  elbepack/tests/notest_pylint.py         |  4 +-
>  elbepack/tests/test_doctest.py          |  3 +-
>  elbepack/tests/test_flake8.py           |  4 +-
>  elbepack/tests/test_preproc.py          |  4 +-
>  elbepack/tests/test_xml.py              |  4 +-
>  elbepack/toolchain.py                   |  4 +-
>  elbepack/treeutils.py                   |  2 +-
>  elbepack/updated.py                     | 32 +++++++++-------
>  elbepack/updated_monitors.py            |  6 ++-
>  elbepack/updatepkg.py                   | 11 +++---
>  elbepack/virtapt.py                     |  6 +--
>  elbepack/xmlpreprocess.py               | 15 ++++----
>  elbepack/ziparchives.py                 |  2 +-
>  89 files changed, 365 insertions(+), 369 deletions(-)
> 
> diff --git a/elbe b/elbe
> index 1e8f2d50..9f344cc0 100755
> --- a/elbe
> +++ b/elbe
> @@ -13,9 +13,8 @@ import sys
>  # this file
>  #
>  import elbepack.commands
> -
> +from elbepack.directories import get_cmdlist, init_directories
>  from elbepack.version import elbe_version
> -from elbepack.directories import init_directories, get_cmdlist
>  
>  
>  def usage():
> diff --git a/elbepack/aptpkgutils.py b/elbepack/aptpkgutils.py
> index 6b58597d..4db70af3 100644
> --- a/elbepack/aptpkgutils.py
> +++ b/elbepack/aptpkgutils.py
> @@ -3,8 +3,8 @@
>  # SPDX-FileCopyrightText: 2005-2009 Canonical
>  # SPDX-FileCopyrightText: 2014, 2017 Linutronix GmbH
>  
> -import os
>  import logging
> +import os
>  
>  import apt
>  from apt.package import FetchError
> diff --git a/elbepack/aptprogress.py b/elbepack/aptprogress.py
> index 0a9fdc54..e85ed130 100644
> --- a/elbepack/aptprogress.py
> +++ b/elbepack/aptprogress.py
> @@ -4,7 +4,8 @@
>  
>  import os
>  
> -from apt.progress.base import InstallProgress, AcquireProgress,
> OpProgress
> +from apt.progress.base import AcquireProgress, InstallProgress,
> OpProgress
> +
>  from apt_pkg import size_to_str
>  
>  
> diff --git a/elbepack/archivedir.py b/elbepack/archivedir.py
> index e5220852..f5013e37 100644
> --- a/elbepack/archivedir.py
> +++ b/elbepack/archivedir.py
> @@ -6,16 +6,14 @@ import bz2
>  import os
>  import re
>  import sys
> -
> -from urllib.parse import urljoin, urlparse
> -
>  from base64 import encodebytes, standard_b64decode
>  from subprocess import CalledProcessError
>  from tempfile import NamedTemporaryFile
> +from urllib.parse import urljoin, urlparse
>  
> -from elbepack.treeutils import etree
> -from elbepack.shellhelper import system
>  from elbepack.filesystem import TmpdirFilesystem
> +from elbepack.shellhelper import system
> +from elbepack.treeutils import etree
>  
>  
>  class ArchivedirError(Exception):
> diff --git a/elbepack/asyncworker.py b/elbepack/asyncworker.py
> index a978eb52..4f0e46d4 100644
> --- a/elbepack/asyncworker.py
> +++ b/elbepack/asyncworker.py
> @@ -2,21 +2,21 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2014-2018 Linutronix GmbH
>  
> -from threading import Thread
> -from queue import Queue
> -from os import path, getcwd, chdir
> +import logging
>  from contextlib import contextmanager
> +from os import chdir, getcwd, path
> +from queue import Queue
> +from threading import Thread
>  from urllib.parse import quote
> -import logging
>  
>  from elbepack.db import get_versioned_filename
>  from elbepack.dump import dump_fullpkgs
> -from elbepack.updatepkg import gen_update_pkg
> -from elbepack.pkgarchive import gen_binpkg_archive,
> checkout_binpkg_archive
> -from elbepack.rfs import DebootstrapException
>  from elbepack.elbeproject import AptCacheCommitError,
> AptCacheUpdateError
> -from elbepack.shellhelper import do
>  from elbepack.log import elbe_logging, read_maxlevel, reset_level
> +from elbepack.pkgarchive import checkout_binpkg_archive,
> gen_binpkg_archive
> +from elbepack.rfs import DebootstrapException
> +from elbepack.shellhelper import do
> +from elbepack.updatepkg import gen_update_pkg
>  
>  
>  class AsyncWorkerJob:
> diff --git a/elbepack/cdroms.py b/elbepack/cdroms.py
> index 15397dfb..89745cf9 100644
> --- a/elbepack/cdroms.py
> +++ b/elbepack/cdroms.py
> @@ -2,22 +2,19 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
>  
> -import os
>  import logging
> -
> +import os
>  from shutil import copyfile
>  
>  from apt.package import FetchError
>  
> -from elbepack.archivedir import archive_tmpfile
> -from elbepack.rpcaptcache import get_rpcaptcache
> -from elbepack.repomanager import CdromSrcRepo
> -from elbepack.repomanager import CdromBinRepo
> -from elbepack.repomanager import CdromInitRepo
>  from elbepack.aptpkgutils import XMLPackage
> +from elbepack.archivedir import archive_tmpfile
>  from elbepack.filesystem import Filesystem, hostfs
> -from elbepack.shellhelper import CommandError, do
>  from elbepack.isooptions import get_iso_options
> +from elbepack.repomanager import CdromBinRepo, CdromInitRepo,
> CdromSrcRepo
> +from elbepack.rpcaptcache import get_rpcaptcache
> +from elbepack.shellhelper import CommandError, do
>  
>  CDROM_SIZE = 640 * 1000 * 1000
>  
> diff --git a/elbepack/commands/add.py b/elbepack/commands/add.py
> index 844820df..d726aa56 100644
> --- a/elbepack/commands/add.py
> +++ b/elbepack/commands/add.py
> @@ -3,7 +3,6 @@
>  # SPDX-FileCopyrightText: 2016-2017 Linutronix GmbH
>  
>  import sys
> -
>  from optparse import OptionParser
>  
>  from elbepack.elbexml import ElbeXML, ValidationError
> diff --git a/elbepack/commands/adjustpkgs.py
> b/elbepack/commands/adjustpkgs.py
> index 76c1337a..2dd8e319 100644
> --- a/elbepack/commands/adjustpkgs.py
> +++ b/elbepack/commands/adjustpkgs.py
> @@ -9,8 +9,8 @@ from optparse import OptionParser
>  import apt
>  import apt.progress
>  
> -from elbepack.treeutils import etree
>  from elbepack.log import elbe_logging
> +from elbepack.treeutils import etree
>  
>  
>  def set_pkgs(pkglist):
> diff --git a/elbepack/commands/bootup-check.py
> b/elbepack/commands/bootup-check.py
> index dcc6126c..ec4b6a25 100644
> --- a/elbepack/commands/bootup-check.py
> +++ b/elbepack/commands/bootup-check.py
> @@ -3,6 +3,7 @@
>  # SPDX-FileCopyrightText: 2014, 2017 Linutronix GmbH
>  
>  import apt
> +
>  import apt_pkg
>  
>  from elbepack.treeutils import etree
> diff --git a/elbepack/commands/buildchroot.py
> b/elbepack/commands/buildchroot.py
> index 28b8419f..98a7715e 100644
> --- a/elbepack/commands/buildchroot.py
> +++ b/elbepack/commands/buildchroot.py
> @@ -3,18 +3,18 @@
>  # SPDX-FileCopyrightText: 2013-2017 Linutronix GmbH
>  # SPDX-FileCopyrightText: 2015 Matthias Buehler
> <Matthias.Buehler at de.trumpf.com>
>  
> -from optparse import OptionParser
> -import sys
>  import logging
> +import sys
> +from optparse import OptionParser
>  
> -from sqlalchemy.exc import OperationalError
> -
> -from elbepack.shellhelper import CommandError
> +from elbepack.cdroms import CDROM_SIZE
> +from elbepack.db import ElbeDB
>  from elbepack.elbeproject import ElbeProject
>  from elbepack.elbexml import ValidationError
> -from elbepack.db import ElbeDB
> -from elbepack.cdroms import CDROM_SIZE
>  from elbepack.log import elbe_logging
> +from elbepack.shellhelper import CommandError
> +
> +from sqlalchemy.exc import OperationalError
>  
>  
>  def run_command(argv):
> diff --git a/elbepack/commands/buildsdk.py
> b/elbepack/commands/buildsdk.py
> index 65bc26ac..1517f272 100644
> --- a/elbepack/commands/buildsdk.py
> +++ b/elbepack/commands/buildsdk.py
> @@ -2,9 +2,9 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2017-2018 Linutronix GmbH
>  
> -from optparse import OptionParser
> -import sys
>  import logging
> +import sys
> +from optparse import OptionParser
>  
>  from elbepack.elbeproject import ElbeProject
>  from elbepack.elbexml import ValidationError
> diff --git a/elbepack/commands/buildsysroot.py
> b/elbepack/commands/buildsysroot.py
> index cb3e4a88..85cce2b9 100644
> --- a/elbepack/commands/buildsysroot.py
> +++ b/elbepack/commands/buildsysroot.py
> @@ -3,8 +3,8 @@
>  # SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
>  
>  import logging
> -from optparse import OptionParser
>  import sys
> +from optparse import OptionParser
>  
>  from elbepack.elbeproject import ElbeProject
>  from elbepack.elbexml import ValidationError
> diff --git a/elbepack/commands/check-build.py
> b/elbepack/commands/check-build.py
> index 239189a2..5e1b32c8 100644
> --- a/elbepack/commands/check-build.py
> +++ b/elbepack/commands/check-build.py
> @@ -10,13 +10,14 @@ import shutil
>  import tempfile
>  import traceback
>  
> -import pexpect
> -
>  from elbepack.directories import elbe_exe
> +from elbepack.filesystem import TmpdirFilesystem
>  from elbepack.log import elbe_logging
> +from elbepack.shellhelper import CommandError, command_out, do,
> get_command_out
>  from elbepack.treeutils import etree
> -from elbepack.shellhelper import get_command_out, command_out, do,
> CommandError
> -from elbepack.filesystem import TmpdirFilesystem
> +
> +import pexpect
> +
>  
>  DEVNULL = open(os.devnull, 'w')
>  
> diff --git a/elbepack/commands/check_updates.py
> b/elbepack/commands/check_updates.py
> index 2b0adb3f..45e6ef96 100644
> --- a/elbepack/commands/check_updates.py
> +++ b/elbepack/commands/check_updates.py
> @@ -3,16 +3,15 @@
>  # SPDX-FileCopyrightText: 2013-2018 Linutronix GmbH
>  
>  import sys
> -
>  from optparse import OptionParser
>  
>  from elbepack import virtapt
> -from elbepack.validate import validate_xml
> -from elbepack.shellhelper import system
> -from elbepack.elbexml import ElbeXML
> -from elbepack.pkgutils import extract_pkg_changelog,
> ChangelogNeedsDependency
>  from elbepack.aptpkgutils import XMLPackage
>  from elbepack.changelogxml import changelogs_xml
> +from elbepack.elbexml import ElbeXML
> +from elbepack.pkgutils import ChangelogNeedsDependency,
> extract_pkg_changelog
> +from elbepack.shellhelper import system
> +from elbepack.validate import validate_xml
>  
>  
>  def build_changelog_xml(v, opt, update_packages):
> diff --git a/elbepack/commands/chg_archive.py
> b/elbepack/commands/chg_archive.py
> index eb1057c6..c905e07d 100644
> --- a/elbepack/commands/chg_archive.py
> +++ b/elbepack/commands/chg_archive.py
> @@ -3,7 +3,6 @@
>  # SPDX-FileCopyrightText: 2013, 2015, 2017 Linutronix GmbH
>  
>  import sys
> -
>  from optparse import OptionParser
>  
>  from elbepack.archivedir import chg_archive
> diff --git a/elbepack/commands/chroot.py
> b/elbepack/commands/chroot.py
> index eacea6b5..6fa9bc8a 100644
> --- a/elbepack/commands/chroot.py
> +++ b/elbepack/commands/chroot.py
> @@ -2,15 +2,15 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
>  
> -from optparse import OptionParser
> -import sys
> -import os
>  import logging
> +import os
> +import sys
> +from optparse import OptionParser
>  
>  from elbepack.elbeproject import ElbeProject
>  from elbepack.elbexml import ValidationError, ValidationMode
> -from elbepack.shellhelper import system, CommandError
>  from elbepack.log import elbe_logging
> +from elbepack.shellhelper import CommandError, system
>  
>  
>  def run_command(argv):
> diff --git a/elbepack/commands/control.py
> b/elbepack/commands/control.py
> index fc84e649..64aad69b 100644
> --- a/elbepack/commands/control.py
> +++ b/elbepack/commands/control.py
> @@ -4,17 +4,16 @@
>  
>  import socket
>  import sys
> -
>  from http.client import BadStatusLine
> -from optparse import (OptionParser, OptionGroup)
> +from optparse import OptionGroup, OptionParser
>  from urllib.error import URLError
>  
> -from suds import WebFault
> -
> -from elbepack.soapclient import ClientAction, ElbeSoapClient
> -from elbepack.version import elbe_version
>  from elbepack.config import cfg
>  from elbepack.elbexml import ValidationMode
> +from elbepack.soapclient import ClientAction, ElbeSoapClient
> +from elbepack.version import elbe_version
> +
> +from suds import WebFault
>  
>  
>  def run_command(argv):
> diff --git a/elbepack/commands/diff.py b/elbepack/commands/diff.py
> index 52c15f43..5ae87112 100644
> --- a/elbepack/commands/diff.py
> +++ b/elbepack/commands/diff.py
> @@ -2,10 +2,9 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2013-2014, 2017 Linutronix GmbH
>  
> +import filecmp
>  import os
>  import sys
> -import filecmp
> -
>  from optparse import OptionParser
>  
>  
> diff --git a/elbepack/commands/fetch_initvm_pkgs.py
> b/elbepack/commands/fetch_initvm_pkgs.py
> index 38519d84..6d263054 100644
> --- a/elbepack/commands/fetch_initvm_pkgs.py
> +++ b/elbepack/commands/fetch_initvm_pkgs.py
> @@ -2,21 +2,21 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2018 Linutronix GmbH
>  
> -import sys
>  import logging
> +import sys
>  from optparse import OptionParser
>  
> -from apt.package import FetchError
>  from apt import Cache
> +from apt.package import FetchError
>  
> -from elbepack.elbexml import ElbeXML, ValidationError
> -from elbepack.repomanager import CdromInitRepo, CdromSrcRepo
> -from elbepack.dump import get_initvm_pkglist
> +from elbepack.aptpkgutils import fetch_binary
>  from elbepack.aptprogress import ElbeAcquireProgress
> +from elbepack.dump import get_initvm_pkglist
> +from elbepack.elbexml import ElbeXML, ValidationError
>  from elbepack.filesystem import hostfs
>  from elbepack.log import elbe_logging
> -from elbepack.shellhelper import do, CommandError
> -from elbepack.aptpkgutils import fetch_binary
> +from elbepack.repomanager import CdromInitRepo, CdromSrcRepo
> +from elbepack.shellhelper import CommandError, do
>  
>  
>  def run_command(argv):
> diff --git a/elbepack/commands/gen_update.py
> b/elbepack/commands/gen_update.py
> index 9c5a69d2..15a59297 100644
> --- a/elbepack/commands/gen_update.py
> +++ b/elbepack/commands/gen_update.py
> @@ -2,15 +2,15 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
>  
> -from optparse import OptionParser
> -import sys
> -import os
>  import logging
> +import os
> +import sys
> +from optparse import OptionParser
>  
>  from elbepack.elbeproject import ElbeProject
>  from elbepack.elbexml import ValidationError
> -from elbepack.updatepkg import gen_update_pkg, MissingData
>  from elbepack.log import elbe_logging
> +from elbepack.updatepkg import MissingData, gen_update_pkg
>  
>  
>  def run_command(argv):
> diff --git a/elbepack/commands/genlicence.py
> b/elbepack/commands/genlicence.py
> index 1d980f91..7c5898fd 100644
> --- a/elbepack/commands/genlicence.py
> +++ b/elbepack/commands/genlicence.py
> @@ -2,13 +2,13 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2014, 2016 Linutronix GmbH
>  
> -from optparse import OptionParser
> -import sys
>  import io
>  import logging
> +import sys
> +from optparse import OptionParser
>  
> -from elbepack.elbexml import ValidationError, ValidationMode
>  from elbepack.elbeproject import ElbeProject
> +from elbepack.elbexml import ValidationError, ValidationMode
>  from elbepack.log import elbe_logging
>  
>  
> diff --git a/elbepack/commands/get_archive.py
> b/elbepack/commands/get_archive.py
> index 696de4a1..e331d20d 100644
> --- a/elbepack/commands/get_archive.py
> +++ b/elbepack/commands/get_archive.py
> @@ -4,7 +4,6 @@
>  
>  import os
>  import sys
> -
>  from base64 import standard_b64decode
>  from optparse import OptionParser
>  
> diff --git a/elbepack/commands/hdimg.py b/elbepack/commands/hdimg.py
> index 22accd6e..d54b7443 100644
> --- a/elbepack/commands/hdimg.py
> +++ b/elbepack/commands/hdimg.py
> @@ -2,9 +2,8 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2012-2017 Linutronix GmbH
>  
> -import sys
>  import logging
> -
> +import sys
>  from optparse import OptionParser
>  
>  from elbepack.elbeproject import ElbeProject
> diff --git a/elbepack/commands/init.py b/elbepack/commands/init.py
> index 5086c2b6..4e2f28ef 100644
> --- a/elbepack/commands/init.py
> +++ b/elbepack/commands/init.py
> @@ -2,24 +2,23 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2014-2015, 2017, 2018 Linutronix GmbH
>  
> +import logging
>  import os
> -import sys
>  import shutil
> -import logging
> -
> +import sys
>  from optparse import OptionParser
>  
> +from elbepack.config import cfg
> +from elbepack.debinstaller import NoKinitrdException, copy_kinitrd
> +from elbepack.directories import elbe_dir, init_template_dir
> +from elbepack.filesystem import Filesystem
> +from elbepack.log import elbe_logging
> +from elbepack.shellhelper import do, system, system_out
> +from elbepack.templates import get_initvm_preseed, write_template
>  from elbepack.treeutils import etree
>  from elbepack.validate import validate_xml
> -from elbepack.debinstaller import copy_kinitrd, NoKinitrdException
> -from elbepack.xmldefaults import ElbeDefaults
>  from elbepack.version import elbe_version
> -from elbepack.templates import write_template, get_initvm_preseed
> -from elbepack.directories import init_template_dir, elbe_dir
> -from elbepack.config import cfg
> -from elbepack.shellhelper import system, do, system_out
> -from elbepack.log import elbe_logging
> -from elbepack.filesystem import Filesystem
> +from elbepack.xmldefaults import ElbeDefaults
>  
>  
>  def run_command(argv):
> diff --git a/elbepack/commands/initvm.py
> b/elbepack/commands/initvm.py
> index 14a0830f..83b4878d 100644
> --- a/elbepack/commands/initvm.py
> +++ b/elbepack/commands/initvm.py
> @@ -2,10 +2,10 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2015-2017 Linutronix GmbH
>  
> -import sys
>  import os
> -
> +import sys
>  from optparse import OptionParser
> +
>  from elbepack.initvmaction import InitVMAction, InitVMError
>  from elbepack.xmlpreprocess import PreprocessWrapper
>  
> diff --git a/elbepack/commands/mkcdrom.py
> b/elbepack/commands/mkcdrom.py
> index 11fef1dd..1cdafb33 100644
> --- a/elbepack/commands/mkcdrom.py
> +++ b/elbepack/commands/mkcdrom.py
> @@ -3,19 +3,18 @@
>  # SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
>  # SPDX-FileCopyrightText: 2015 Matthias Buehler
> <Matthias.Buehler at de.trumpf.com>
>  
> -from optparse import OptionParser
> -import sys
> -import os
>  import logging
> +import os
> +import sys
> +from optparse import OptionParser
>  
> +from elbepack.cdroms import CDROM_SIZE, mk_binary_cdrom,
> mk_source_cdrom
> +from elbepack.efilesystem import ChRootFilesystem
>  from elbepack.elbeproject import ElbeProject
>  from elbepack.elbexml import ValidationError
> -from elbepack.efilesystem import ChRootFilesystem
>  from elbepack.log import elbe_logging
>  from elbepack.rpcaptcache import get_rpcaptcache
>  
> -from elbepack.cdroms import mk_source_cdrom, mk_binary_cdrom,
> CDROM_SIZE
> -
>  
>  def run_command(argv):
>  
> diff --git a/elbepack/commands/parselicence.py
> b/elbepack/commands/parselicence.py
> index c2f273e5..ee22375f 100644
> --- a/elbepack/commands/parselicence.py
> +++ b/elbepack/commands/parselicence.py
> @@ -2,17 +2,16 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2016-2017 Linutronix GmbH
>  
> -from optparse import OptionParser
> -from datetime import datetime
> -import sys
> -import os
>  import io
> -
> +import os
> +import sys
> +from datetime import datetime
> +from optparse import OptionParser
>  from tempfile import NamedTemporaryFile
>  
> +from elbepack.shellhelper import system_out
>  from elbepack.treeutils import etree
>  from elbepack.version import elbe_version
> -from elbepack.shellhelper import system_out
>  
>  
>  class license_dep5_to_spdx (dict):
> diff --git a/elbepack/commands/pbuilder.py
> b/elbepack/commands/pbuilder.py
> index 8a8198f2..d4db0388 100644
> --- a/elbepack/commands/pbuilder.py
> +++ b/elbepack/commands/pbuilder.py
> @@ -3,8 +3,8 @@
>  # SPDX-FileCopyrightText: 2015-2017 Linutronix GmbH
>  
>  import sys
> -
>  from optparse import OptionParser
> +
>  from elbepack.pbuilderaction import PBuilderAction, PBuilderError
>  from elbepack.xmlpreprocess import PreprocessWrapper
>  
> diff --git a/elbepack/commands/pin_versions.py
> b/elbepack/commands/pin_versions.py
> index 94dcb87b..f99a7811 100644
> --- a/elbepack/commands/pin_versions.py
> +++ b/elbepack/commands/pin_versions.py
> @@ -3,7 +3,6 @@
>  # SPDX-FileCopyrightText: 2016-2017 Linutronix GmbH
>  
>  import sys
> -
>  from optparse import OptionParser
>  
>  from elbepack.treeutils import etree
> diff --git a/elbepack/commands/pkgdiff.py
> b/elbepack/commands/pkgdiff.py
> index 1ce469a5..9493415d 100644
> --- a/elbepack/commands/pkgdiff.py
> +++ b/elbepack/commands/pkgdiff.py
> @@ -4,10 +4,10 @@
>  
>  import os
>  import sys
> -
>  from optparse import OptionParser
>  
>  import apt
> +
>  import apt_pkg
>  
>  from elbepack.elbexml import ElbeXML, ValidationMode
> diff --git a/elbepack/commands/preprocess.py
> b/elbepack/commands/preprocess.py
> index 9cf1af4e..65f58a87 100644
> --- a/elbepack/commands/preprocess.py
> +++ b/elbepack/commands/preprocess.py
> @@ -2,9 +2,10 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2017 Linutronix GmbH
>  
> -import sys
>  import os
> +import sys
>  from optparse import OptionParser
> +
>  from elbepack.xmlpreprocess import XMLPreprocessError, xmlpreprocess
>  
>  
> diff --git a/elbepack/commands/prjrepo.py
> b/elbepack/commands/prjrepo.py
> index 32fffd09..58d23867 100644
> --- a/elbepack/commands/prjrepo.py
> +++ b/elbepack/commands/prjrepo.py
> @@ -4,16 +4,15 @@
>  
>  import socket
>  import sys
> -
>  from http.client import BadStatusLine
> -from optparse import (OptionParser, OptionGroup)
> +from optparse import OptionGroup, OptionParser
>  from urllib.error import URLError
>  
> -from suds import WebFault
> -
> -from elbepack.soapclient import RepoAction, ElbeSoapClient
> -from elbepack.version import elbe_version
>  from elbepack.config import cfg
> +from elbepack.soapclient import ElbeSoapClient, RepoAction
> +from elbepack.version import elbe_version
> +
> +from suds import WebFault
>  
>  
>  def run_command(argv):
> diff --git a/elbepack/commands/repodir.py
> b/elbepack/commands/repodir.py
> index 41a0d39c..62d8a077 100644
> --- a/elbepack/commands/repodir.py
> +++ b/elbepack/commands/repodir.py
> @@ -1,12 +1,12 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2022 Linutronix GmbH
>  
> -import sys
>  import os
> +import sys
>  from optparse import OptionParser
>  from threading import Event
>  
> -from elbepack.repodir import RepodirError, Repodir
> +from elbepack.repodir import Repodir, RepodirError
>  
>  
>  def run_command(argv):
> diff --git a/elbepack/commands/setsel.py
> b/elbepack/commands/setsel.py
> index 1bfeec38..9c572a0a 100644
> --- a/elbepack/commands/setsel.py
> +++ b/elbepack/commands/setsel.py
> @@ -3,7 +3,6 @@
>  # SPDX-FileCopyrightText: 2013-2014, 2017 Linutronix GmbH
>  
>  import sys
> -
>  from optparse import OptionParser
>  
>  from elbepack.treeutils import etree
> diff --git a/elbepack/commands/show.py b/elbepack/commands/show.py
> index 4ac9add9..3256bb8c 100644
> --- a/elbepack/commands/show.py
> +++ b/elbepack/commands/show.py
> @@ -3,7 +3,6 @@
>  # SPDX-FileCopyrightText: 2013-2015, 2017 Linutronix GmbH
>  
>  import sys
> -
>  from optparse import OptionParser
>  
>  from elbepack.treeutils import etree
> diff --git a/elbepack/commands/test.py b/elbepack/commands/test.py
> index 909ac92c..a5a22a10 100644
> --- a/elbepack/commands/test.py
> +++ b/elbepack/commands/test.py
> @@ -12,10 +12,10 @@ import re
>  import unittest
>  import warnings
>  
> -import junitxml as junit
> -
>  from elbepack.shellhelper import command_out
>  
> +import junitxml as junit
> +
>  
>  class ElbeTestLevel(enum.IntEnum):
>      BASE = enum.auto()
> diff --git a/elbepack/commands/toolchainextract.py
> b/elbepack/commands/toolchainextract.py
> index c3140e7b..3b0461ae 100644
> --- a/elbepack/commands/toolchainextract.py
> +++ b/elbepack/commands/toolchainextract.py
> @@ -2,17 +2,16 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
>  
> -from optparse import OptionParser
> -from tempfile import mkdtemp
> -
>  import os
>  import sys
> +from optparse import OptionParser
> +from tempfile import mkdtemp
>  
> -from elbepack.xmldefaults import ElbeDefaults
> -from elbepack.repomanager import ToolchainRepo
>  from elbepack.debpkg import build_binary_deb
> -from elbepack.toolchain import get_toolchain
>  from elbepack.log import elbe_logging
> +from elbepack.repomanager import ToolchainRepo
> +from elbepack.toolchain import get_toolchain
> +from elbepack.xmldefaults import ElbeDefaults
>  
>  
>  def run_command(argv):
> diff --git a/elbepack/commands/updated.py
> b/elbepack/commands/updated.py
> index cfaf7da9..d8da2313 100644
> --- a/elbepack/commands/updated.py
> +++ b/elbepack/commands/updated.py
> @@ -6,15 +6,15 @@
>  import os
>  import signal
>  import sys
> -
>  from optparse import OptionParser
>  from wsgiref.simple_server import make_server
>  
> +from elbepack.updated import UpdateApplication, UpdateService,
> UpdateStatus
> +from elbepack.updated_monitors import FileMonitor
> +
>  from spyne.protocol.soap import Soap11
>  from spyne.server.wsgi import WsgiApplication
>  
> -from elbepack.updated import UpdateStatus, UpdateService,
> UpdateApplication
> -from elbepack.updated_monitors import FileMonitor
>  try:
>      from elbepack.updated_monitors import USBMonitor
>      usbmonitor_available = True
> diff --git a/elbepack/commands/validate.py
> b/elbepack/commands/validate.py
> index c0114419..00feeb6b 100644
> --- a/elbepack/commands/validate.py
> +++ b/elbepack/commands/validate.py
> @@ -2,11 +2,12 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2013-2017 Linutronix GmbH
>  
> -import sys
>  import os
> +import sys
>  from optparse import OptionParser
> +
> +from elbepack.elbexml import ElbeXML, ValidationError,
> ValidationMode
>  from elbepack.validate import validate_xml
> -from elbepack.elbexml import ElbeXML, ValidationMode,
> ValidationError
>  
>  
>  def run_command(argv):
> diff --git a/elbepack/commands/xsdtoasciidoc.py
> b/elbepack/commands/xsdtoasciidoc.py
> index 07578dd1..3658d844 100644
> --- a/elbepack/commands/xsdtoasciidoc.py
> +++ b/elbepack/commands/xsdtoasciidoc.py
> @@ -3,12 +3,11 @@
>  # SPDX-FileCopyrightText: 2013-2017 Linutronix GmbH
>  
>  import sys
> -
>  from optparse import OptionParser
>  
> -from elbepack.treeutils import etree
>  from elbepack.directories import xsdtoasciidoc_mako_fname
>  from elbepack.templates import write_template
> +from elbepack.treeutils import etree
>  
>  
>  def run_command(argv):
> diff --git a/elbepack/daemons/soap/__init__.py
> b/elbepack/daemons/soap/__init__.py
> index 87324a20..503e8c16 100644
> --- a/elbepack/daemons/soap/__init__.py
> +++ b/elbepack/daemons/soap/__init__.py
> @@ -2,22 +2,22 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
>  
> -import sys
>  import logging
> +import sys
>  import warnings
>  
>  from beaker.middleware import SessionMiddleware
> +
>  from cherrypy.process.plugins import SimplePlugin
>  
> +from elbepack.projectmanager import ProjectManager
> +
>  from spyne import Application
>  from spyne.protocol.soap import Soap11
>  from spyne.server.wsgi import WsgiApplication
>  
> -from elbepack.projectmanager import ProjectManager
> -
>  from .esoap import ESoap
>  
> -
>  logging.getLogger('spyne').setLevel(logging.INFO)
>  
>  warnings.simplefilter('ignore', category=PendingDeprecationWarning)
> diff --git a/elbepack/daemons/soap/authentication.py
> b/elbepack/daemons/soap/authentication.py
> index 1a92e0b8..6895da8f 100644
> --- a/elbepack/daemons/soap/authentication.py
> +++ b/elbepack/daemons/soap/authentication.py
> @@ -4,7 +4,7 @@
>  
>  from functools import wraps
>  
> -from .faults import SoapElbeNotLoggedIn, SoapElbeNotAuthorized
> +from .faults import SoapElbeNotAuthorized, SoapElbeNotLoggedIn
>  
>  
>  def authenticated_uid(func):
> diff --git a/elbepack/daemons/soap/datatypes.py
> b/elbepack/daemons/soap/datatypes.py
> index 94d73ec4..4dc6eca7 100644
> --- a/elbepack/daemons/soap/datatypes.py
> +++ b/elbepack/daemons/soap/datatypes.py
> @@ -3,7 +3,7 @@
>  # SPDX-FileCopyrightText: 2015-2017 Linutronix GmbH
>  
>  from spyne.model.complex import ComplexModel
> -from spyne.model.primitive import Unicode, DateTime, Integer
> +from spyne.model.primitive import DateTime, Integer, Unicode
>  
>  
>  class SoapProject (ComplexModel):
> diff --git a/elbepack/daemons/soap/esoap.py
> b/elbepack/daemons/soap/esoap.py
> index c381c344..cae16827 100644
> --- a/elbepack/daemons/soap/esoap.py
> +++ b/elbepack/daemons/soap/esoap.py
> @@ -4,25 +4,24 @@
>  # SPDX-FileCopyrightText: 2016 Claudius Heine <ch at denx.de>
>  
>  import binascii
> +import fnmatch
>  import os
>  import tarfile
> -import fnmatch
> -
>  from tempfile import NamedTemporaryFile
>  
> -from spyne.service import ServiceBase
> -from spyne.decorator import rpc
> -from spyne.model.primitive import String, Boolean, Integer
> -from spyne.model.complex import Array
> -
> -from elbepack.shellhelper import system, command_out
> -from elbepack.version import elbe_version, is_devel
>  from elbepack.elbexml import ValidationMode
>  from elbepack.filesystem import hostfs
> +from elbepack.shellhelper import command_out, system
> +from elbepack.version import elbe_version, is_devel
> +
> +from spyne.decorator import rpc
> +from spyne.model.complex import Array
> +from spyne.model.primitive import Boolean, Integer, String
> +from spyne.service import ServiceBase
>  
> -from .faults import soap_faults
> -from .datatypes import SoapProject, SoapFile, SoapCmdReply
>  from .authentication import authenticated_admin, authenticated_uid
> +from .datatypes import SoapCmdReply, SoapFile, SoapProject
> +from .faults import soap_faults
>  
>  
>  class ESoap (ServiceBase):
> diff --git a/elbepack/daemons/soap/faults.py
> b/elbepack/daemons/soap/faults.py
> index 4cd3ac98..6552162b 100644
> --- a/elbepack/daemons/soap/faults.py
> +++ b/elbepack/daemons/soap/faults.py
> @@ -2,16 +2,14 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2015-2017 Linutronix GmbH
>  
> -from traceback import format_exc
>  from functools import wraps
> +from traceback import format_exc
>  
> -from spyne.model.fault import Fault
> -
> -# Import the Errors we try to catch wirh the
> -# soap_faults decorator
> -from elbepack.projectmanager import ProjectManagerError,
> InvalidState
> -from elbepack.elbexml import ValidationError
>  from elbepack.db import ElbeDBError, InvalidLogin
> +from elbepack.elbexml import ValidationError
> +from elbepack.projectmanager import InvalidState,
> ProjectManagerError
> +
> +from spyne.model.fault import Fault
>  
>  
>  class SoapElbeDBError(Fault):
> diff --git a/elbepack/db.py b/elbepack/db.py
> index 532109e4..b0145cc4 100644
> --- a/elbepack/db.py
> +++ b/elbepack/db.py
> @@ -3,32 +3,37 @@
>  # SPDX-FileCopyrightText: 2014-2018 Linutronix GmbH
>  
>  
> -import os
>  import errno
> -import re
>  import glob
> -
> -from datetime import datetime
> -from shutil import (rmtree, copyfile, copyfileobj)
> +import os
> +import re
>  from contextlib import contextmanager
> -from urllib.parse import quote
> +from datetime import datetime
> +from shutil import copyfile, copyfileobj, rmtree
>  from threading import Thread
> +from urllib.parse import quote
>  
> -from sqlalchemy.ext.declarative import declarative_base
> -from sqlalchemy import (Column, ForeignKey)
> -from sqlalchemy import (Integer, String, Boolean, Sequence,
> DateTime)
> -
> -from sqlalchemy import create_engine
> -from sqlalchemy.orm import sessionmaker, scoped_session
> -from sqlalchemy.orm import relationship
> -from sqlalchemy.orm.exc import NoResultFound
> -from sqlalchemy.exc import OperationalError
> +from elbepack.dosunix import dos2unix
> +from elbepack.elbeproject import ElbeProject
> +from elbepack.elbexml import ElbeXML, ValidationMode
>  
>  from passlib.hash import pbkdf2_sha512
>  
> -from elbepack.elbeproject import ElbeProject
> -from elbepack.elbexml import (ElbeXML, ValidationMode)
> -from elbepack.dosunix import dos2unix
> +from sqlalchemy import (
> +    Boolean,
> +    Column,
> +    DateTime,
> +    ForeignKey,
> +    Integer,
> +    Sequence,
> +    String,
> +    create_engine,
> +)
> +from sqlalchemy.exc import OperationalError
> +from sqlalchemy.ext.declarative import declarative_base
> +from sqlalchemy.orm import relationship, scoped_session,
> sessionmaker
> +from sqlalchemy.orm.exc import NoResultFound
> +
>  
>  os.environ['SQLALCHEMY_SILENCE_UBER_WARNING'] = '1'
>  Base = declarative_base()
> diff --git a/elbepack/dbaction.py b/elbepack/dbaction.py
> index 7edd4faa..12deac19 100644
> --- a/elbepack/dbaction.py
> +++ b/elbepack/dbaction.py
> @@ -3,10 +3,10 @@
>  # SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
>  
>  import sys
> -
> -from optparse import OptionParser
>  from getpass import getpass
> +from optparse import OptionParser
>  from shutil import copyfileobj
> +
>  from elbepack.db import ElbeDB, ElbeDBError
>  
>  
> diff --git a/elbepack/debinstaller.py b/elbepack/debinstaller.py
> index e9bc0827..513a028d 100644
> --- a/elbepack/debinstaller.py
> +++ b/elbepack/debinstaller.py
> @@ -2,20 +2,19 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2018 Linutronix GmbH
>  
> -import sys
>  import os
>  import re
> -
> +import sys
>  from shutil import copyfile
>  from urllib.request import urlopen
>  
> -from gpg import core
> -from gpg.constants import PROTOCOL_OpenPGP
> -
> -from elbepack.filesystem import TmpdirFilesystem
>  from elbepack.egpg import OverallStatus, check_signature
> +from elbepack.filesystem import TmpdirFilesystem
> +from elbepack.hashes import HashValidationFailed, HashValidator
>  from elbepack.shellhelper import CommandError, system
> -from elbepack.hashes import HashValidator, HashValidationFailed
> +
> +from gpg import core
> +from gpg.constants import PROTOCOL_OpenPGP
>  
>  
>  class InvalidSignature(Exception):
> diff --git a/elbepack/debpkg.py b/elbepack/debpkg.py
> index 1cced6f8..89019caf 100644
> --- a/elbepack/debpkg.py
> +++ b/elbepack/debpkg.py
> @@ -4,7 +4,6 @@
>  
>  import os
>  import string
> -
>  from tempfile import mkdtemp
>  
>  control_template_string = """Package: ${name}
> diff --git a/elbepack/directories.py b/elbepack/directories.py
> index 136e2767..b7c53af6 100644
> --- a/elbepack/directories.py
> +++ b/elbepack/directories.py
> @@ -3,7 +3,6 @@
>  # SPDX-FileCopyrightText: 2015, 2017 Linutronix GmbH
>  
>  import os
> -
>  from pkgutil import iter_modules
>  
>  import elbepack
> diff --git a/elbepack/dump.py b/elbepack/dump.py
> index f513916c..b99b6b14 100644
> --- a/elbepack/dump.py
> +++ b/elbepack/dump.py
> @@ -3,18 +3,17 @@
>  # SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
>  
>  import logging
> -
> -from fnmatch import fnmatchcase
>  from datetime import datetime
> +from fnmatch import fnmatchcase
>  
>  from apt import Cache
>  
> +from elbepack.aptpkgutils import APTPackage
>  from elbepack.archivedir import archive_tmpfile
> -from elbepack.finetuning import do_finetuning
>  from elbepack.filesystem import hostfs
> -from elbepack.version import elbe_version
> -from elbepack.aptpkgutils import APTPackage
> +from elbepack.finetuning import do_finetuning
>  from elbepack.shellhelper import do
> +from elbepack.version import elbe_version
>  
>  report = logging.getLogger('report')
>  validation = logging.getLogger('validation')
> diff --git a/elbepack/efilesystem.py b/elbepack/efilesystem.py
> index e3271c4c..798316c6 100644
> --- a/elbepack/efilesystem.py
> +++ b/elbepack/efilesystem.py
> @@ -2,25 +2,21 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2015-2018 Linutronix GmbH
>  
> +import io
> +import logging
>  import os
> -import time
>  import shutil
> -import subprocess
> -import io
>  import stat
> -import logging
> +import subprocess
> +import time
>  
>  from elbepack.filesystem import Filesystem
> -from elbepack.version import elbe_version
> -from elbepack.hdimg import do_hdimg
>  from elbepack.fstab import fstabentry
> +from elbepack.hdimg import do_hdimg
>  from elbepack.licencexml import copyright_xml
>  from elbepack.packers import default_packer
> -from elbepack.shellhelper import (system,
> -                                  CommandError,
> -                                  do,
> -                                  chroot,
> -                                  get_command_out)
> +from elbepack.shellhelper import CommandError, chroot, do,
> get_command_out, system
> +from elbepack.version import elbe_version
>  
>  
>  def copy_filelist(src, file_lst, dst):
> diff --git a/elbepack/egpg.py b/elbepack/egpg.py
> index d5711812..31a234d1 100644
> --- a/elbepack/egpg.py
> +++ b/elbepack/egpg.py
> @@ -5,13 +5,14 @@
>  import logging
>  import os
>  
> -from gpg import core
> -from gpg.constants import sigsum, sig, PROTOCOL_OpenPGP
> -from gpg.errors import GPGMEError, KeyNotFound, InvalidSigners
> -
>  from elbepack.filesystem import hostfs
>  from elbepack.shellhelper import CommandError, get_command_out,
> system
>  
> +from gpg import core
> +from gpg.constants import PROTOCOL_OpenPGP, sig, sigsum
> +from gpg.errors import GPGMEError, InvalidSigners, KeyNotFound
> +
> +
>  elbe_internal_key_param = """
>  <GnupgKeyParms format="internal">
>    Key-Type: RSA
> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
> index 746bafe6..6bc90d73 100644
> --- a/elbepack/elbeproject.py
> +++ b/elbepack/elbeproject.py
> @@ -3,41 +3,38 @@
>  # SPDX-FileCopyrightText: 2014-2018 Linutronix GmbH
>  
>  
> -import os
>  import datetime
> +import glob
>  import io
>  import logging
> +import os
>  import sys
> -import glob
> -
> -from elbepack.shellhelper import CommandError, system, do, chroot
> -
> -from elbepack.elbexml import (ElbeXML, NoInitvmNode,
> -                              ValidationError, ValidationMode)
> -
> -from elbepack.rfs import BuildEnv
> -from elbepack.rpcaptcache import get_rpcaptcache
> -from elbepack.efilesystem import TargetFs
> -from elbepack.efilesystem import extract_target
> -from elbepack.filesystem import size_to_int
>  
>  from elbepack.aptpkgutils import XMLPackage
> -
> -from elbepack.dump import elbe_report
> -from elbepack.dump import dump_debootstrappkgs, dump_initvmpkgs,
> dump_fullpkgs
> -from elbepack.dump import check_full_pkgs
> -
> -from elbepack.cdroms import mk_source_cdrom, mk_binary_cdrom
> -
> -from elbepack.pbuilder import (pbuilder_write_config,
> pbuilder_write_repo_hook,
> -                               pbuilder_write_cross_config,
> -                               pbuilder_write_apt_conf)
> -
> -from elbepack.repomanager import ProjectRepo
> +from elbepack.cdroms import mk_binary_cdrom, mk_source_cdrom
>  from elbepack.config import cfg
> -from elbepack.templates import write_pack_template
> +from elbepack.dump import (
> +    check_full_pkgs,
> +    dump_debootstrappkgs,
> +    dump_fullpkgs,
> +    dump_initvmpkgs,
> +    elbe_report,
> +)
> +from elbepack.efilesystem import TargetFs, extract_target
> +from elbepack.elbexml import ElbeXML, NoInitvmNode, ValidationError,
> ValidationMode
> +from elbepack.filesystem import size_to_int
>  from elbepack.finetuning import do_prj_finetuning
> -
> +from elbepack.pbuilder import (
> +    pbuilder_write_apt_conf,
> +    pbuilder_write_config,
> +    pbuilder_write_cross_config,
> +    pbuilder_write_repo_hook,
> +)
> +from elbepack.repomanager import ProjectRepo
> +from elbepack.rfs import BuildEnv
> +from elbepack.rpcaptcache import get_rpcaptcache
> +from elbepack.shellhelper import CommandError, chroot, do, system
> +from elbepack.templates import write_pack_template
>  
>  validation = logging.getLogger('validation')
>  
> diff --git a/elbepack/elbexml.py b/elbepack/elbexml.py
> index 12f92b55..11c2b3f7 100644
> --- a/elbepack/elbexml.py
> +++ b/elbepack/elbexml.py
> @@ -6,17 +6,19 @@
>  import os
>  import re
>  import socket
> -
>  from urllib.error import URLError
> -from urllib.request import (urlopen, install_opener, build_opener,
> -                            HTTPPasswordMgrWithDefaultRealm,
> -                            HTTPBasicAuthHandler)
> +from urllib.request import (
> +    HTTPBasicAuthHandler,
> +    HTTPPasswordMgrWithDefaultRealm,
> +    build_opener,
> +    install_opener,
> +    urlopen,
> +)
>  
>  from elbepack.treeutils import etree
>  from elbepack.validate import validate_xml
> -from elbepack.xmldefaults import ElbeDefaults
> -
>  from elbepack.version import elbe_version, is_devel
> +from elbepack.xmldefaults import ElbeDefaults
>  
>  
>  class ValidationError(Exception):
> diff --git a/elbepack/filesystem.py b/elbepack/filesystem.py
> index 5746a394..399f85c3 100644
> --- a/elbepack/filesystem.py
> +++ b/elbepack/filesystem.py
> @@ -2,14 +2,13 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
>  
> +import errno
> +import gzip
>  import os
>  import shutil
> -import errno
> -
>  from glob import glob
> -from tempfile import mkdtemp
>  from string import digits
> -import gzip
> +from tempfile import mkdtemp
>  
>  from elbepack.shellhelper import do
>  
> diff --git a/elbepack/finetuning.py b/elbepack/finetuning.py
> index a7ad4d6c..796f4bb1 100644
> --- a/elbepack/finetuning.py
> +++ b/elbepack/finetuning.py
> @@ -2,24 +2,24 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
>  
> -import os
> -import errno
>  import base64
> +import errno
>  import logging
> -
> +import os
>  from shutil import rmtree
> -from gpg import core
> -from gpg.constants import PROTOCOL_OpenPGP
> +
>  from apt.package import FetchError
>  
> -from elbepack.repomanager import UpdateRepo
> -from elbepack.rpcaptcache import get_rpcaptcache
> -from elbepack.shellhelper import CommandError
> +from elbepack.egpg import unlock_key
>  from elbepack.filesystem import ImgMountFilesystem
> +from elbepack.junit import TestException, TestSuite
>  from elbepack.packers import default_packer, packers
> -from elbepack.egpg import unlock_key
> -from elbepack.junit import TestSuite, TestException
> -from elbepack.shellhelper import chroot, do, get_command_out
> +from elbepack.repomanager import UpdateRepo
> +from elbepack.rpcaptcache import get_rpcaptcache
> +from elbepack.shellhelper import CommandError, chroot, do,
> get_command_out
> +
> +from gpg import core
> +from gpg.constants import PROTOCOL_OpenPGP
>  
>  
>  class FinetuningException(Exception):
> diff --git a/elbepack/fstab.py b/elbepack/fstab.py
> index c9452845..6d45be62 100644
> --- a/elbepack/fstab.py
> +++ b/elbepack/fstab.py
> @@ -6,7 +6,7 @@
>  import os
>  import time
>  
> -from elbepack.shellhelper import do, get_command_out, CommandError
> +from elbepack.shellhelper import CommandError, do, get_command_out
>  
>  
>  def get_mtdnum(xml, label):
> diff --git a/elbepack/hashes.py b/elbepack/hashes.py
> index 5e61b579..c7db8907 100644
> --- a/elbepack/hashes.py
> +++ b/elbepack/hashes.py
> @@ -3,7 +3,8 @@
>  # SPDX-FileCopyrightText: 2018 Linutronix GmbH
>  
>  import hashlib
> -from elbepack.shellhelper import system, CommandError
> +
> +from elbepack.shellhelper import CommandError, system
>  
>  
>  class HashValidationFailed(Exception):
> diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
> index 19027b71..cc0d4d22 100644
> --- a/elbepack/hdimg.py
> +++ b/elbepack/hdimg.py
> @@ -4,15 +4,15 @@
>  
>  import logging
>  import os
> -
>  from pathlib import Path
>  
> -import parted
>  import _ped
>  
> -from elbepack.fstab import fstabentry, mountpoint_dict, hdpart
>  from elbepack.filesystem import Filesystem, size_to_int
> -from elbepack.shellhelper import do, CommandError, chroot,
> get_command_out
> +from elbepack.fstab import fstabentry, hdpart, mountpoint_dict
> +from elbepack.shellhelper import CommandError, chroot, do,
> get_command_out
> +
> +import parted
>  
>  
>  def mkfs_mtd(mtd, fslabel, target):
> diff --git a/elbepack/initvmaction.py b/elbepack/initvmaction.py
> index a250f209..a1543d56 100644
> --- a/elbepack/initvmaction.py
> +++ b/elbepack/initvmaction.py
> @@ -3,20 +3,19 @@
>  # SPDX-FileCopyrightText: 2015-2018 Linutronix GmbH
>  # SPDX-FileCopyrightText: 2015 Silvio Fricke
> <silvio.fricke at gmail.com>
>  
> +import datetime
> +import os
>  import sys
>  import time
> -import os
> -import datetime
>  
>  import elbepack
> -from elbepack.treeutils import etree
> +from elbepack.config import cfg
>  from elbepack.directories import elbe_exe
> -from elbepack.shellhelper import CommandError, system,
> command_out_stderr, \
> -                                 command_out
> -from elbepack.filesystem import TmpdirFilesystem
>  from elbepack.elbexml import ElbeXML, ValidationError,
> ValidationMode
> -from elbepack.config import cfg
> -from elbepack.repodir import RepodirError, Repodir
> +from elbepack.filesystem import TmpdirFilesystem
> +from elbepack.repodir import Repodir, RepodirError
> +from elbepack.shellhelper import CommandError, command_out,
> command_out_stderr, system
> +from elbepack.treeutils import etree
>  from elbepack.xmlpreprocess import PreprocessWrapper
>  
>  
> diff --git a/elbepack/licencexml.py b/elbepack/licencexml.py
> index b750189e..92b70edf 100644
> --- a/elbepack/licencexml.py
> +++ b/elbepack/licencexml.py
> @@ -4,13 +4,17 @@
>  
>  
>  import io
> +import logging
>  import re
> -
>  import warnings
> -import logging
>  
> -from debian.copyright import Copyright, LicenseParagraph, \
> -                             NotMachineReadableError,
> MachineReadableFormatError
> +from debian.copyright import (
> +    Copyright,
> +    LicenseParagraph,
> +    MachineReadableFormatError,
> +    NotMachineReadableError,
> +)
> +
>  from elbepack.treeutils import etree
>  
>  warnings.simplefilter('error')
> diff --git a/elbepack/log.py b/elbepack/log.py
> index 4e3409ed..e2cceb62 100644
> --- a/elbepack/log.py
> +++ b/elbepack/log.py
> @@ -6,11 +6,11 @@
>  import collections
>  import logging
>  import os
> -import threading
>  import re
> -
> +import threading
>  from contextlib import contextmanager
>  
> +
>  root = logging.getLogger()
>  root.setLevel(logging.DEBUG)
>  local = threading.local()
> diff --git a/elbepack/packers.py b/elbepack/packers.py
> index 2ec8b57a..7a3a929d 100644
> --- a/elbepack/packers.py
> +++ b/elbepack/packers.py
> @@ -3,6 +3,7 @@
>  # SPDX-FileCopyrightText: 2019 Linutronix GmbH
>  
>  import os
> +
>  from elbepack.shellhelper import CommandError, do
>  
>  
> diff --git a/elbepack/pbuilder.py b/elbepack/pbuilder.py
> index 81645d0b..1c61d551 100644
> --- a/elbepack/pbuilder.py
> +++ b/elbepack/pbuilder.py
> @@ -3,7 +3,6 @@
>  # SPDX-FileCopyrightText: 2015-2017 Linutronix GmbH
>  
>  import os
> -
>  from urllib.request import urlopen
>  
>  from elbepack.filesystem import Filesystem
> diff --git a/elbepack/pbuilderaction.py b/elbepack/pbuilderaction.py
> index a35a5e27..a108c316 100644
> --- a/elbepack/pbuilderaction.py
> +++ b/elbepack/pbuilderaction.py
> @@ -2,12 +2,12 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2015-2017 Linutronix GmbH
>  
> -import sys
>  import os
> +import sys
>  
>  from elbepack.directories import elbe_exe
> -from elbepack.shellhelper import CommandError, system,
> command_out_stderr
>  from elbepack.filesystem import TmpdirFilesystem
> +from elbepack.shellhelper import CommandError, command_out_stderr,
> system
>  from elbepack.xmlpreprocess import PreprocessWrapper
>  
>  
> diff --git a/elbepack/pkgarchive.py b/elbepack/pkgarchive.py
> index 0ad969a4..346133e7 100644
> --- a/elbepack/pkgarchive.py
> +++ b/elbepack/pkgarchive.py
> @@ -5,9 +5,11 @@
>  import errno
>  import logging
>  from os import path, remove
> -from shutil import rmtree, copytree, move
> +from shutil import copytree, move, rmtree
> +
>  from apt.package import FetchError
> -from elbepack.repomanager import RepoBase, RepoAttributes
> +
> +from elbepack.repomanager import RepoAttributes, RepoBase
>  
>  
>  class ArchiveRepo(RepoBase):
> diff --git a/elbepack/pkgutils.py b/elbepack/pkgutils.py
> index cee7f72c..23b76544 100644
> --- a/elbepack/pkgutils.py
> +++ b/elbepack/pkgutils.py
> @@ -6,6 +6,7 @@ import os
>  import re
>  
>  from apt_pkg import TagFile
> +
>  from elbepack.filesystem import TmpdirFilesystem
>  from elbepack.shellhelper import system
>  
> diff --git a/elbepack/projectmanager.py b/elbepack/projectmanager.py
> index 564368fd..dcd7e84d 100644
> --- a/elbepack/projectmanager.py
> +++ b/elbepack/projectmanager.py
> @@ -4,22 +4,29 @@
>  
>  import errno
>  import os
> -
>  from os import path
> +from shutil import rmtree
>  from threading import Lock
>  from uuid import uuid4
> -from shutil import rmtree
>  
> +from elbepack.asyncworker import (
> +    APTCommitJob,
> +    APTUpdUpgrJob,
> +    APTUpdateJob,
> +    AsyncWorker,
> +    BuildCDROMsJob,
> +    BuildChrootTarJob,
> +    BuildJob,
> +    BuildSDKJob,
> +    BuildSysrootJob,
> +    CheckoutVersionJob,
> +    CreatePbuilderJob,
> +    GenUpdateJob,
> +    PdebuildJob,
> +    SaveVersionJob,
> +    UpdatePbuilderJob,
> +)
>  from elbepack.db import ElbeDB, get_versioned_filename
> -
> -from elbepack.asyncworker import (AsyncWorker, BuildJob,
> APTUpdateJob,
> -                                  APTCommitJob, GenUpdateJob,
> -                                  SaveVersionJob,
> CheckoutVersionJob,
> -                                  APTUpdUpgrJob, BuildSysrootJob,
> -                                  PdebuildJob, CreatePbuilderJob,
> -                                  UpdatePbuilderJob,
> BuildChrootTarJob,
> -                                  BuildSDKJob, BuildCDROMsJob)
> -
>  from elbepack.elbexml import ValidationMode
>  from elbepack.log import read_loggingQ
>  
> diff --git a/elbepack/repodir.py b/elbepack/repodir.py
> index c9359b5d..67ac247a 100644
> --- a/elbepack/repodir.py
> +++ b/elbepack/repodir.py
> @@ -4,11 +4,10 @@
>  import functools
>  import os
>  import sys
> -
> -from http.server import SimpleHTTPRequestHandler, HTTPServer
> +from http.server import HTTPServer, SimpleHTTPRequestHandler
>  from threading import Thread
>  
> -from lxml.etree import XMLParser, parse, Element, XMLSyntaxError
> +from lxml.etree import Element, XMLParser, XMLSyntaxError, parse
>  
>  
>  class RepodirError(Exception):
> diff --git a/elbepack/repomanager.py b/elbepack/repomanager.py
> index c54de0a0..862bc615 100644
> --- a/elbepack/repomanager.py
> +++ b/elbepack/repomanager.py
> @@ -7,9 +7,9 @@ import shutil
>  
>  from debian.deb822 import Deb822
>  
> +from elbepack.egpg import export_key, generate_elbe_internal_key,
> unlock_key
>  from elbepack.filesystem import Filesystem
>  from elbepack.pkgutils import get_dsc_size
> -from elbepack.egpg import generate_elbe_internal_key, export_key,
> unlock_key
>  from elbepack.shellhelper import CommandError, do
>  
>  
> diff --git a/elbepack/rfs.py b/elbepack/rfs.py
> index a4c5c31f..e82e43a1 100644
> --- a/elbepack/rfs.py
> +++ b/elbepack/rfs.py
> @@ -3,16 +3,14 @@
>  # SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
>  # SPDX-FileCopyrightText: 2014 Ferdinand Schwenk
> <ferdinand.schwenk at emtrion.de>
>  
> -import os
>  import logging
> -
> +import os
>  from urllib.parse import urlsplit
>  
>  from elbepack.efilesystem import BuildImgFs
>  from elbepack.egpg import unarmor_openpgp_keyring
> -from elbepack.templates import (write_pack_template, get_preseed,
> -                                preseed_to_text)
> -from elbepack.shellhelper import CommandError, do, chroot,
> get_command_out
> +from elbepack.shellhelper import CommandError, chroot, do,
> get_command_out
> +from elbepack.templates import get_preseed, preseed_to_text,
> write_pack_template
>  
>  
>  def create_apt_prefs(xml, rfs):
> diff --git a/elbepack/rpcaptcache.py b/elbepack/rpcaptcache.py
> index 7ba54fc4..b71fc7a3 100644
> --- a/elbepack/rpcaptcache.py
> +++ b/elbepack/rpcaptcache.py
> @@ -6,20 +6,29 @@ import logging
>  import os
>  import sys
>  import time
> -
> -from multiprocessing.util import Finalize
>  from multiprocessing.managers import BaseManager
> +from multiprocessing.util import Finalize
>  
> -from apt_pkg import config, version_compare, TagFile, SourceRecords,
> Acquire, AcquireFile
>  from apt import Cache
>  from apt.package import FetchError
>  
> -from elbepack.aptprogress import (ElbeAcquireProgress,
> ElbeInstallProgress,
> -                                  ElbeOpProgress)
> -from elbepack.aptpkgutils import getalldeps, APTPackage,
> fetch_binary
> +from apt_pkg import (
> +    Acquire,
> +    AcquireFile,
> +    SourceRecords,
> +    TagFile,
> +    config,
> +    version_compare,
> +)
> +
> +from elbepack.aptpkgutils import APTPackage, fetch_binary,
> getalldeps
> +from elbepack.aptprogress import (
> +    ElbeAcquireProgress,
> +    ElbeInstallProgress,
> +    ElbeOpProgress,
> +)
>  from elbepack.log import async_logging
>  
> -
>  log = logging.getLogger('log')
>  soap = logging.getLogger('soap')
>  
> diff --git a/elbepack/shellhelper.py b/elbepack/shellhelper.py
> index 698a1a07..be805742 100644
> --- a/elbepack/shellhelper.py
> +++ b/elbepack/shellhelper.py
> @@ -3,12 +3,10 @@
>  # SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
>  # SPDX-FileCopyrightText: 2014 Ferdinand Schwenk
> <ferdinand.schwenk at emtrion.de>
>  
> -import os
>  import logging
> -
> -from subprocess import Popen, PIPE, STDOUT, call
> -
> -from io import TextIOWrapper, BytesIO
> +import os
> +from io import BytesIO, TextIOWrapper
> +from subprocess import PIPE, Popen, STDOUT, call
>  
>  from elbepack.log import async_logging
>  
> diff --git a/elbepack/soapclient.py b/elbepack/soapclient.py
> index 434486fa..90091ab5 100644
> --- a/elbepack/soapclient.py
> +++ b/elbepack/soapclient.py
> @@ -4,26 +4,25 @@
>  # SPDX-FileCopyrightText: 2016 Claudius Heine <ch at denx.de>
>  
>  import binascii
> +import fnmatch
>  import logging
> +import os
>  import socket
> -import time
>  import sys
> -import os
> -import fnmatch
> -
> +import time
>  from datetime import datetime
>  from http.client import BadStatusLine
>  from urllib.error import URLError
>  
> -import deb822   # package for dealing with Debian related data
> -
> -from suds.client import Client
> -from suds import WebFault
> +import deb822
>  
>  from elbepack.config import cfg
> -from elbepack.filesystem import Filesystem
>  from elbepack.elbexml import ElbeXML, ValidationMode
> -from elbepack.version import elbe_version, elbe_initvm_packagelist
> +from elbepack.filesystem import Filesystem
> +from elbepack.version import elbe_initvm_packagelist, elbe_version
> +
> +from suds import WebFault
> +from suds.client import Client
>  
>  
>  def set_suds_debug(debug):
> diff --git a/elbepack/templates.py b/elbepack/templates.py
> index 577c98dc..45dc2ddf 100644
> --- a/elbepack/templates.py
> +++ b/elbepack/templates.py
> @@ -4,11 +4,11 @@
>  
>  import os
>  
> -from mako.template import Template
> -from mako import exceptions
> -
> +from elbepack.directories import default_preseed_fname,
> mako_template_dir
>  from elbepack.treeutils import etree
> -from elbepack.directories import mako_template_dir,
> default_preseed_fname
> +
> +from mako import exceptions
> +from mako.template import Template
>  
>  
>  def fix_linebreak_escapes(s):
> diff --git a/elbepack/tests/notest_pylint.py
> b/elbepack/tests/notest_pylint.py
> index 5d918a7a..ac1e5007 100644
> --- a/elbepack/tests/notest_pylint.py
> +++ b/elbepack/tests/notest_pylint.py
> @@ -4,9 +4,9 @@
>  
>  import os
>  
> -from elbepack.commands.test import ElbeTestCase, system,
> ElbeTestException
> +from elbepack.commands.test import ElbeTestCase, ElbeTestException,
> system
> +from elbepack.directories import elbe_dir, elbe_exe, pack_dir
>  from elbepack.shellhelper import system_out
> -from elbepack.directories import pack_dir, elbe_exe, elbe_dir
>  
>  
>  class TestPylint(ElbeTestCase):
> diff --git a/elbepack/tests/test_doctest.py
> b/elbepack/tests/test_doctest.py
> index 8d6ffcea..3694bca5 100644
> --- a/elbepack/tests/test_doctest.py
> +++ b/elbepack/tests/test_doctest.py
> @@ -4,9 +4,8 @@
>  
>  import doctest
>  
> -import elbepack.shellhelper as shellhelper
>  import elbepack.filesystem as filesystem
> -
> +import elbepack.shellhelper as shellhelper
>  from elbepack.commands.test import ElbeTestCase
>  
>  
> diff --git a/elbepack/tests/test_flake8.py
> b/elbepack/tests/test_flake8.py
> index 39dec13f..4ae8dfa7 100644
> --- a/elbepack/tests/test_flake8.py
> +++ b/elbepack/tests/test_flake8.py
> @@ -4,9 +4,9 @@
>  
>  import os
>  
> -from elbepack.commands.test import ElbeTestCase, system,
> ElbeTestException
> +from elbepack.commands.test import ElbeTestCase, ElbeTestException,
> system
> +from elbepack.directories import elbe_exe, pack_dir
>  from elbepack.shellhelper import system_out
> -from elbepack.directories import pack_dir, elbe_exe
>  
>  
>  class TestPylint(ElbeTestCase):
> diff --git a/elbepack/tests/test_preproc.py
> b/elbepack/tests/test_preproc.py
> index 0219032b..bd7da0f8 100644
> --- a/elbepack/tests/test_preproc.py
> +++ b/elbepack/tests/test_preproc.py
> @@ -5,8 +5,8 @@
>  import os
>  import sys
>  
> -from elbepack.commands.test import ElbeTestCase, system,
> ElbeTestException
> -from elbepack.directories import elbe_exe, elbe_dir
> +from elbepack.commands.test import ElbeTestCase, ElbeTestException,
> system
> +from elbepack.directories import elbe_dir, elbe_exe
>  
>  
>  class TestPreproc(ElbeTestCase):
> diff --git a/elbepack/tests/test_xml.py b/elbepack/tests/test_xml.py
> index 11e7df31..78c819dd 100644
> --- a/elbepack/tests/test_xml.py
> +++ b/elbepack/tests/test_xml.py
> @@ -4,11 +4,11 @@
>  
>  import os
>  import sys
> -import unittest
>  import tempfile
> +import unittest
>  
> -from elbepack.directories import elbe_dir, elbe_exe
>  from elbepack.commands.test import ElbeTestCase, ElbeTestLevel,
> system
> +from elbepack.directories import elbe_dir, elbe_exe
>  
>  
>  @unittest.skipIf(ElbeTestCase.level < ElbeTestLevel.INITVM,
> diff --git a/elbepack/toolchain.py b/elbepack/toolchain.py
> index 1e426659..fa78cb1a 100644
> --- a/elbepack/toolchain.py
> +++ b/elbepack/toolchain.py
> @@ -2,10 +2,10 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2014, 2017 Linutronix GmbH
>  
> -import string
> -
>  import glob
>  import os
> +import string
> +
>  
>  arch2triple = {'armhf': 'arm-linux-gnueabihf', 'armel': 'arm-linux-
> gnueabi'}
>  
> diff --git a/elbepack/treeutils.py b/elbepack/treeutils.py
> index 83cd48ed..6d384ca5 100644
> --- a/elbepack/treeutils.py
> +++ b/elbepack/treeutils.py
> @@ -4,7 +4,7 @@
>  
>  import copy
>  
> -from lxml.etree import ElementTree, SubElement, Element
> +from lxml.etree import Element, ElementTree, SubElement
>  from lxml.etree import XMLParser, parse
>  
>  # ElementTree helpers
> diff --git a/elbepack/updated.py b/elbepack/updated.py
> index 309babf6..c0a32a5c 100644
> --- a/elbepack/updated.py
> +++ b/elbepack/updated.py
> @@ -8,29 +8,33 @@ import os
>  import subprocess
>  import sys
>  import threading
> -
>  from multiprocessing import Process
> -from zipfile import (ZipFile, BadZipfile)
> -from shutil import copyfile, rmtree, copy
> -
> +from shutil import copy, copyfile, rmtree
>  from syslog import syslog
> -from packaging import version
> -
> -from suds.client import Client
> -from spyne import Application
> -from spyne.service import ServiceBase
> -from spyne.decorator import rpc
> -from spyne.model.primitive import String
> +from zipfile import BadZipfile, ZipFile
>  
>  import apt
> +
>  import apt_pkg
>  
> -from elbepack.aptprogress import (ElbeInstallProgress,
> -                                  ElbeAcquireProgress,
> ElbeOpProgress)
> +from elbepack.aptprogress import (
> +    ElbeAcquireProgress,
> +    ElbeInstallProgress,
> +    ElbeOpProgress,
> +)
>  from elbepack.config import cfg
>  from elbepack.egpg import unsign_file
> -from elbepack.treeutils import etree
>  from elbepack.shellhelper import CommandError, system
> +from elbepack.treeutils import etree
> +
> +from packaging import version
> +
> +from spyne import Application
> +from spyne.decorator import rpc
> +from spyne.model.primitive import String
> +from spyne.service import ServiceBase
> +
> +from suds.client import Client
>  
>  
>  class UpdateStatus:
> diff --git a/elbepack/updated_monitors.py
> b/elbepack/updated_monitors.py
> index 12fd1ab9..81305f4f 100644
> --- a/elbepack/updated_monitors.py
> +++ b/elbepack/updated_monitors.py
> @@ -5,10 +5,12 @@
>  
>  import os
>  import threading
> +
> +from elbepack.updated import handle_update_file, is_update_file
> +
>  import pyinotify
> -import pyudev
>  
> -from elbepack.updated import is_update_file, handle_update_file
> +import pyudev
>  
>  
>  class UpdateMonitor:
> diff --git a/elbepack/updatepkg.py b/elbepack/updatepkg.py
> index 5d136677..3b28f4db 100644
> --- a/elbepack/updatepkg.py
> +++ b/elbepack/updatepkg.py
> @@ -2,16 +2,15 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2014-2015, 2017 Linutronix GmbH
>  
> -import os
>  import logging
> +import os
> +from shutil import copyfile, copytree, rmtree
>  
> -from shutil import rmtree, copyfile, copytree
> -
> -from elbepack.elbexml import ElbeXML
>  from elbepack.dump import dump_fullpkgs
> -from elbepack.ziparchives import create_zip_archive
> +from elbepack.elbexml import ElbeXML
>  from elbepack.repomanager import UpdateRepo
> -from elbepack.shellhelper import system, do
> +from elbepack.shellhelper import do, system
> +from elbepack.ziparchives import create_zip_archive
>  
>  
>  class MissingData(Exception):
> diff --git a/elbepack/virtapt.py b/elbepack/virtapt.py
> index e6635807..614f5d31 100644
> --- a/elbepack/virtapt.py
> +++ b/elbepack/virtapt.py
> @@ -6,18 +6,16 @@
>  import os
>  import sys
>  
> -
>  # don't remove the apt import, it is really needed, due to some
> magic in
>  # apt_pkg
> -
>  import apt
> -import apt_pkg
>  
> +import apt_pkg
>  
>  from elbepack.egpg import unarmor_openpgp_keyring
> -from elbepack.shellhelper import system
>  from elbepack.filesystem import TmpdirFilesystem
>  from elbepack.rfs import create_apt_prefs
> +from elbepack.shellhelper import system
>  
>  
>  def getdeps(pkg):
> diff --git a/elbepack/xmlpreprocess.py b/elbepack/xmlpreprocess.py
> index 3118dba2..7c860a46 100644
> --- a/elbepack/xmlpreprocess.py
> +++ b/elbepack/xmlpreprocess.py
> @@ -8,23 +8,24 @@ import re
>  import sys
>  import tempfile
>  import time
> -
> -from optparse import OptionGroup
>  from itertools import islice
> +from optparse import OptionGroup
>  from urllib.error import HTTPError, URLError
>  from urllib.request import urlopen
> -from passlib.hash import sha512_crypt
> -
> -from lxml import etree
> -from lxml.etree import XMLParser, Element, SubElement
>  
>  from elbepack.archivedir import ArchivedirError, combinearchivedir
>  from elbepack.config import cfg
>  from elbepack.directories import elbe_exe
> -from elbepack.shellhelper import command_out_stderr, CommandError
>  from elbepack.isooptions import iso_option_valid
> +from elbepack.shellhelper import CommandError, command_out_stderr
>  from elbepack.validate import error_log_to_strings
>  
> +from lxml import etree
> +from lxml.etree import Element, SubElement, XMLParser
> +
> +from passlib.hash import sha512_crypt
> +
> +
>  # list of sections that are allowed to exists multiple times before
>  # preprocess and that childrens are merge into one section during
> preprocess
>  mergepaths = ['//target/finetuning',
> diff --git a/elbepack/ziparchives.py b/elbepack/ziparchives.py
> index bbfb648f..97465017 100644
> --- a/elbepack/ziparchives.py
> +++ b/elbepack/ziparchives.py
> @@ -2,8 +2,8 @@
>  # SPDX-License-Identifier: GPL-3.0-or-later
>  # SPDX-FileCopyrightText: 2014, 2017 Linutronix GmbH
>  
> -from zipfile import ZipFile, ZipInfo, ZIP_DEFLATED
>  import os
> +from zipfile import ZIP_DEFLATED, ZipFile, ZipInfo
>  
>  
>  def create_zip_archive(zipfilename, path, inarchpath):

-- 
Eduard Krein
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 19; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/legal/data-protection.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, Sharon Heck, Yulia Beck, Tiffany Silva




More information about the elbe-devel mailing list