[elbe-devel] [PATCH 25/25] pylint: more import order fixes

Torben Hohn torben.hohn at linutronix.de
Wed Aug 22 10:42:26 CEST 2018


for some reason pylint -d all -e C0411 did not show these.
but they were in the complete complaint list.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/aptprogress.py         | 3 ++-
 elbepack/commands/adjustpkgs.py | 7 +++----
 elbepack/commands/daemon.py     | 7 +++----
 elbepack/commands/pkgdiff.py    | 4 ++--
 elbepack/directories.py         | 4 +++-
 elbepack/finetuning.py          | 3 ++-
 elbepack/gpg.py                 | 3 ++-
 elbepack/initvmaction.py        | 4 ++--
 elbepack/licencexml.py          | 5 +++--
 elbepack/pbuilderaction.py      | 6 +++---
 elbepack/soapclient.py          | 3 ++-
 elbepack/treeutils.py           | 4 ++--
 elbepack/updated.py             | 5 +++--
 elbepack/virtapt.py             | 8 +++++---
 14 files changed, 37 insertions(+), 29 deletions(-)

diff --git a/elbepack/aptprogress.py b/elbepack/aptprogress.py
index 1d36437c..4710163f 100644
--- a/elbepack/aptprogress.py
+++ b/elbepack/aptprogress.py
@@ -6,9 +6,10 @@
 
 from __future__ import print_function
 
+import os
+
 from apt.progress.base import InstallProgress, AcquireProgress, OpProgress
 from apt_pkg import size_to_str
-import os
 
 
 class ElbeInstallProgress (InstallProgress):
diff --git a/elbepack/commands/adjustpkgs.py b/elbepack/commands/adjustpkgs.py
index 0e8a560b..55a53033 100644
--- a/elbepack/commands/adjustpkgs.py
+++ b/elbepack/commands/adjustpkgs.py
@@ -6,15 +6,14 @@
 
 from __future__ import print_function
 
+import sys
 from optparse import OptionParser
 
-from elbepack.asciidoclog import ASCIIDocLog
-from elbepack.treeutils import etree
-
 import apt
 import apt.progress
 
-import sys
+from elbepack.asciidoclog import ASCIIDocLog
+from elbepack.treeutils import etree
 
 
 class adjpkg(object):
diff --git a/elbepack/commands/daemon.py b/elbepack/commands/daemon.py
index 8a06b4ab..f035464f 100644
--- a/elbepack/commands/daemon.py
+++ b/elbepack/commands/daemon.py
@@ -5,14 +5,13 @@
 
 from __future__ import print_function
 
-import cherrypy
-
+import sys
 from optparse import OptionParser
 from pkgutil import iter_modules
 
-import elbepack.daemons
+import cherrypy
 
-import sys
+import elbepack.daemons
 
 
 def get_daemonlist():
diff --git a/elbepack/commands/pkgdiff.py b/elbepack/commands/pkgdiff.py
index 4810a932..91754e47 100644
--- a/elbepack/commands/pkgdiff.py
+++ b/elbepack/commands/pkgdiff.py
@@ -10,11 +10,11 @@ from __future__ import print_function
 import os
 import sys
 
+from optparse import OptionParser
+
 import apt
 import apt_pkg
 
-from optparse import OptionParser
-
 from elbepack.elbexml import ElbeXML, ValidationMode
 
 
diff --git a/elbepack/directories.py b/elbepack/directories.py
index 04ffb30a..66fd960f 100644
--- a/elbepack/directories.py
+++ b/elbepack/directories.py
@@ -5,10 +5,12 @@
 #
 # SPDX-License-Identifier: GPL-3.0-or-later
 
-import elbepack
 import os
+
 from pkgutil import iter_modules
 
+import elbepack
+
 elbe_exe = None
 elbe_dir = None
 examples_dir = None
diff --git a/elbepack/finetuning.py b/elbepack/finetuning.py
index 3838ab1d..ddce159e 100644
--- a/elbepack/finetuning.py
+++ b/elbepack/finetuning.py
@@ -9,11 +9,12 @@
 from __future__ import print_function
 
 import os
-import gpgme
 
 from shutil import rmtree
 from io import BytesIO
 
+import gpgme
+
 from apt.package import FetchError
 
 from elbepack.repomanager import UpdateRepo
diff --git a/elbepack/gpg.py b/elbepack/gpg.py
index af3081ae..dd9fb090 100644
--- a/elbepack/gpg.py
+++ b/elbepack/gpg.py
@@ -7,9 +7,10 @@
 
 from __future__ import print_function
 
-import gpgme
 import os
 
+import gpgme
+
 from elbepack.filesystem import hostfs
 
 elbe_internal_key_param = """
diff --git a/elbepack/initvmaction.py b/elbepack/initvmaction.py
index aea75fc7..6660b93a 100644
--- a/elbepack/initvmaction.py
+++ b/elbepack/initvmaction.py
@@ -15,10 +15,10 @@ import time
 import os
 import datetime
 
-import libvirt
-
 from tempfile import NamedTemporaryFile
 
+import libvirt
+
 import elbepack
 from elbepack.treeutils import etree
 from elbepack.directories import elbe_exe
diff --git a/elbepack/licencexml.py b/elbepack/licencexml.py
index c2615aea..579892cb 100644
--- a/elbepack/licencexml.py
+++ b/elbepack/licencexml.py
@@ -4,14 +4,15 @@
 #
 # SPDX-License-Identifier: GPL-3.0-or-later
 
-from elbepack.treeutils import etree
-from debian.copyright import Copyright, LicenseParagraph
 
 import io
 import re
 
 import warnings
 
+from debian.copyright import Copyright, LicenseParagraph
+from elbepack.treeutils import etree
+
 warnings.simplefilter('error')
 
 remove_re = re.compile(u'[\x00-\x08\x0B-\x0C\x0E-\x1F\x7F]')
diff --git a/elbepack/pbuilderaction.py b/elbepack/pbuilderaction.py
index a530be03..7accaaae 100644
--- a/elbepack/pbuilderaction.py
+++ b/elbepack/pbuilderaction.py
@@ -6,13 +6,13 @@
 
 from __future__ import print_function
 
+import sys
+import os
+
 from elbepack.directories import elbe_exe
 from elbepack.shellhelper import CommandError, system, command_out_stderr
 from elbepack.filesystem import TmpdirFilesystem
 
-import sys
-import os
-
 
 def cmd_exists(x): return any(os.access(os.path.join(path, x), os.X_OK)
                               for path in os.environ["PATH"].split(os.pathsep))
diff --git a/elbepack/soapclient.py b/elbepack/soapclient.py
index c753ce3b..4963ed1c 100644
--- a/elbepack/soapclient.py
+++ b/elbepack/soapclient.py
@@ -14,12 +14,13 @@ import time
 import sys
 import os
 import fnmatch
-import deb822   # package for dealing with Debian related data
 
 from datetime import datetime
 from urllib2 import URLError
 from httplib import BadStatusLine
 
+import deb822   # package for dealing with Debian related data
+
 from suds.client import Client
 from suds import WebFault
 
diff --git a/elbepack/treeutils.py b/elbepack/treeutils.py
index 9cdf2f32..5b5430cd 100644
--- a/elbepack/treeutils.py
+++ b/elbepack/treeutils.py
@@ -6,13 +6,13 @@
 
 from __future__ import print_function
 
+import copy
+
 from lxml.etree import ElementTree, SubElement, Element
 from lxml.etree import XMLParser, parse
-import copy
 
 # ElementTree helpers
 
-
 class eiter(object):
     def __init__(self, it):
         self.it = it
diff --git a/elbepack/updated.py b/elbepack/updated.py
index 48804dff..717d51ac 100644
--- a/elbepack/updated.py
+++ b/elbepack/updated.py
@@ -10,8 +10,6 @@
 
 from __future__ import print_function
 
-import apt
-import apt_pkg
 import errno
 import os
 import subprocess
@@ -24,6 +22,9 @@ from shutil import copyfile, rmtree, copy
 
 from syslog import syslog
 
+import apt
+import apt_pkg
+
 from spyne import Application
 from spyne.service import ServiceBase
 from spyne.decorator import rpc
diff --git a/elbepack/virtapt.py b/elbepack/virtapt.py
index b053551f..5ed2bee8 100644
--- a/elbepack/virtapt.py
+++ b/elbepack/virtapt.py
@@ -8,16 +8,18 @@
 
 from __future__ import print_function
 
-import apt_pkg
 import os
 import sys
 
+from tempfile import mkdtemp
+
+from multiprocessing.managers import BaseManager
+
 # don't remove the apt import, it is really needed, due to some magic in
 # apt_pkg
 import apt
+import apt_pkg
 
-from tempfile import mkdtemp
-from multiprocessing.managers import BaseManager
 
 from elbepack.shellhelper import CommandError, system
 from elbepack.directories import elbe_pubkey_fname
-- 
2.11.0




More information about the elbe-devel mailing list