From ed9cec771d1ca1e312b898f610fca0a230cae8cf Mon Sep 17 00:00:00 2001
From: Ondrej Nosek <onosek@redhat.com>
Date: Nov 02 2020 02:52:01 +0000
Subject: Code-style improvement - imports are sorted


Signed-off-by: Ondrej Nosek <onosek@redhat.com>

---

diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
index a4dc6d9..52dcee3 100644
--- a/pyrpkg/__init__.py
+++ b/pyrpkg/__init__.py
@@ -11,37 +11,37 @@
 
 from __future__ import print_function
 
-import cccolutils
 import errno
 import fnmatch
 import getpass
-import git
 import glob
 import io
 import json
-import koji
 import logging
 import os
 import posixpath
 import random
 import re
-import requests
-import rpm
 import shutil
-import six
 import subprocess
 import sys
 import tempfile
 import time
-import yaml
-
 from itertools import groupby
 from multiprocessing.dummy import Pool as ThreadPool
 from operator import itemgetter
-from six.moves import configparser
-from six.moves import urllib
+
+import git
+import requests
+import rpm
+import six
+import yaml
+from six.moves import configparser, urllib
 from six.moves.urllib.parse import urljoin
 
+import cccolutils
+import koji
+from pyrpkg import layout
 from pyrpkg.errors import (HashtypeMixingError, UnknownTargetError,
                            rpkgAuthError, rpkgError)
 from pyrpkg.lookaside import CGILookasideCache
@@ -49,7 +49,6 @@ from pyrpkg.sources import SourcesFile
 from pyrpkg.utils import (cached_property, extract_srpm, find_me,
                           is_file_tracked, is_lookaside_eligible_file,
                           log_result)
-from pyrpkg import layout
 
 from .gitignore import GitIgnore
 
diff --git a/pyrpkg/layout/__init__.py b/pyrpkg/layout/__init__.py
index 1e34df1..2bd3e61 100644
--- a/pyrpkg/layout/__init__.py
+++ b/pyrpkg/layout/__init__.py
@@ -10,6 +10,7 @@
 
 
 from pyrpkg.errors import LayoutError
+
 from .base import MetaLayout
 from .layouts import (DistGitLayout, IncompleteLayout,  # noqa: F401
                       RetiredLayout, SRPMLayout)
diff --git a/pyrpkg/layout/base.py b/pyrpkg/layout/base.py
index cc0cd33..8673b60 100644
--- a/pyrpkg/layout/base.py
+++ b/pyrpkg/layout/base.py
@@ -9,15 +9,14 @@
 """base and meta package layout classes"""
 
 
-import os
 import abc
-from abc import abstractmethod, ABCMeta
+import os
+from abc import ABCMeta, abstractmethod
 
 import six
 
 from pyrpkg.errors import LayoutError
 
-
 if six.PY2:
     ABC = abc.ABCMeta('ABC', (object,), {'__slots__': ()})
 else:
diff --git a/pyrpkg/layout/layouts.py b/pyrpkg/layout/layouts.py
index 3e4cec1..7f5b8ef 100644
--- a/pyrpkg/layout/layouts.py
+++ b/pyrpkg/layout/layouts.py
@@ -11,9 +11,10 @@
 
 import os
 
-from .base import BaseLayout
 from pyrpkg.errors import LayoutError
 
+from .base import BaseLayout
+
 
 class DistGitLayout(BaseLayout):
     """
diff --git a/pyrpkg/lookaside.py b/pyrpkg/lookaside.py
index 27a6951..b112957 100644
--- a/pyrpkg/lookaside.py
+++ b/pyrpkg/lookaside.py
@@ -20,11 +20,10 @@ import logging
 import os
 import sys
 
+import pycurl
 import six
 from six.moves import http_client
 
-import pycurl
-
 from .errors import DownloadError, InvalidHashType, UploadError
 
 
diff --git a/tests/commands/__init__.py b/tests/commands/__init__.py
index a93ea9d..dcc0562 100644
--- a/tests/commands/__init__.py
+++ b/tests/commands/__init__.py
@@ -3,6 +3,7 @@ import shutil
 import subprocess
 import sys
 import tempfile
+
 # For running tests with Python 2.6
 try:
     import unittest2 as unittest
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 91dd524..5ad8665 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -19,7 +19,7 @@ from six.moves import StringIO, configparser, http_client
 import koji_cli.lib
 import pyrpkg.cli
 import utils
-from pyrpkg import Commands, Modulemd, rpkgError, layout
+from pyrpkg import Commands, Modulemd, layout, rpkgError
 from utils import CommandTestCase, FakeThreadPool
 
 try:
diff --git a/tests/test_layout_distgit.py b/tests/test_layout_distgit.py
index 32c8480..1aaa972 100644
--- a/tests/test_layout_distgit.py
+++ b/tests/test_layout_distgit.py
@@ -1,9 +1,8 @@
 import os
 import unittest
 
-from pyrpkg.layout import layouts
 from pyrpkg import errors
-
+from pyrpkg.layout import layouts
 
 fixtures_dir = os.path.join(os.path.dirname(__file__), 'fixtures')
 
diff --git a/tests/test_layout_incomplete.py b/tests/test_layout_incomplete.py
index 04589fd..77130e0 100644
--- a/tests/test_layout_incomplete.py
+++ b/tests/test_layout_incomplete.py
@@ -1,9 +1,8 @@
 import os
 import unittest
 
-from pyrpkg.layout import layouts
 from pyrpkg import errors
-
+from pyrpkg.layout import layouts
 
 fixtures_dir = os.path.join(os.path.dirname(__file__), 'fixtures')
 
diff --git a/tests/test_layout_retired.py b/tests/test_layout_retired.py
index a046769..bd40555 100644
--- a/tests/test_layout_retired.py
+++ b/tests/test_layout_retired.py
@@ -1,9 +1,8 @@
 import os
 import unittest
 
-from pyrpkg.layout import layouts
 from pyrpkg import errors
-
+from pyrpkg.layout import layouts
 
 fixtures_dir = os.path.join(os.path.dirname(__file__), 'fixtures')
 
diff --git a/tests/test_layout_srpm.py b/tests/test_layout_srpm.py
index 2311dd3..241ef38 100644
--- a/tests/test_layout_srpm.py
+++ b/tests/test_layout_srpm.py
@@ -1,9 +1,8 @@
 import os
 import unittest
 
-from pyrpkg.layout import layouts
 from pyrpkg import errors
-
+from pyrpkg.layout import layouts
 
 fixtures_dir = os.path.join(os.path.dirname(__file__), 'fixtures')
 
diff --git a/tests/test_lookaside.py b/tests/test_lookaside.py
index 83b331b..7e22d93 100644
--- a/tests/test_lookaside.py
+++ b/tests/test_lookaside.py
@@ -14,8 +14,8 @@ import tempfile
 import unittest
 
 import mock
-
 import pycurl
+
 from pyrpkg.errors import DownloadError, InvalidHashType, UploadError
 from pyrpkg.lookaside import CGILookasideCache
 
diff --git a/tests/test_utils.py b/tests/test_utils.py
index 1ad5925..7054b9e 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -5,13 +5,8 @@ import warnings
 
 import mock
 
-from pyrpkg.utils import (
-    cached_property,
-    is_file_in_directory,
-    is_file_tracked,
-    log_result,
-    warn_deprecated,
-)
+from pyrpkg.utils import (cached_property, is_file_in_directory,
+                          is_file_tracked, log_result, warn_deprecated)
 from utils import CommandTestCase
 
 

