Skip to content

Commit 8b1813f

Browse files
pylint: fix wrong-import-order cases
Fix all cases of C0411 wrong-import-order. Part of #270
1 parent c757a6f commit 8b1813f

14 files changed

+38
-31
lines changed

tarantool/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import ctypes
1919
import ctypes.util
2020
from ctypes import c_ssize_t
21+
from typing import Union
2122

2223
import msgpack
2324

@@ -108,7 +109,6 @@
108109
CrudError,
109110
call_crud,
110111
)
111-
from typing import Union
112112

113113
WWSAEWOULDBLOCK = 10035
114114
ER_UNKNOWN_REQUEST_TYPE = 48

tarantool/request.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
"""
55

66
import sys
7-
import msgpack
87
import hashlib
9-
108
from collections.abc import Sequence, Mapping
119

10+
import msgpack
1211

1312
from tarantool.error import DatabaseError
1413
from tarantool.const import (

test/setup_command.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
import os
44
import sys
55
import unittest
6-
import setuptools
76
from distutils.errors import DistutilsError
8-
97
from glob import glob
108

9+
import setuptools
10+
1111
class Test(setuptools.Command):
1212
user_options = []
1313
description = 'Run tests'

test/suites/lib/skip.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import functools
2-
import pkg_resources
32
import re
43
import sys
54

5+
import pkg_resources
6+
67
def fetch_tarantool_version(self):
78
"""Helper to fetch current Tarantool version.
89
"""

test/suites/lib/tarantool_admin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import socket
2-
import yaml
32
import re
3+
44
import pkg_resources
5+
import yaml
56

67

78
class TarantoolAdmin(object):

test/suites/lib/tarantool_server.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@
1010
import shutil
1111
import subprocess
1212

13-
from .tarantool_admin import TarantoolAdmin
14-
1513
from tarantool.const import (
1614
SSL_TRANSPORT
1715
)
1816

17+
from .tarantool_admin import TarantoolAdmin
1918

2019
def check_port(port, rais=True):
2120
try:

test/suites/test_crud.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
import sys
33
import time
44
import unittest
5+
56
import tarantool
6-
from .lib.tarantool_server import TarantoolServer
77
from tarantool.error import DatabaseError
88

9+
from .lib.tarantool_server import TarantoolServer
910

1011
def create_server():
1112
srv = TarantoolServer()

test/suites/test_datetime.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
import sys
22
import re
33
import unittest
4-
import msgpack
54
import warnings
6-
import tarantool
5+
6+
import msgpack
77
import pandas
88

9+
import tarantool
10+
from tarantool.error import MsgpackError, MsgpackWarning
911
from tarantool.msgpack_ext.packer import default as packer_default
1012
from tarantool.msgpack_ext.unpacker import ext_hook as unpacker_ext_hook
1113

1214
from .lib.tarantool_server import TarantoolServer
1315
from .lib.skip import skip_or_run_datetime_test
14-
from tarantool.error import MsgpackError, MsgpackWarning
1516

1617
class TestSuiteDatetime(unittest.TestCase):
1718
@classmethod

test/suites/test_decimal.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
import sys
22
import unittest
33
import decimal
4-
import msgpack
54
import warnings
6-
import tarantool
75

6+
import msgpack
7+
8+
import tarantool
9+
from tarantool.error import MsgpackError, MsgpackWarning
810
from tarantool.msgpack_ext.packer import default as packer_default
911
from tarantool.msgpack_ext.unpacker import ext_hook as unpacker_ext_hook
1012

1113
from .lib.tarantool_server import TarantoolServer
1214
from .lib.skip import skip_or_run_decimal_test
13-
from tarantool.error import MsgpackError, MsgpackWarning
1415

1516
class TestSuiteDecimal(unittest.TestCase):
1617
@classmethod

test/suites/test_error_ext.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import sys
22
import unittest
33
import uuid
4-
import msgpack
54
import warnings
6-
import tarantool
75
import pkg_resources
86

7+
import msgpack
8+
9+
import tarantool
910
from tarantool.msgpack_ext.packer import default as packer_default
1011
from tarantool.msgpack_ext.unpacker import ext_hook as unpacker_ext_hook
1112

test/suites/test_interval.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
import re
22
import sys
33
import unittest
4-
import msgpack
54
import warnings
6-
import tarantool
5+
6+
import msgpack
77
import pandas
88
import pytz
99

10+
import tarantool
11+
from tarantool.error import MsgpackError
1012
from tarantool.msgpack_ext.packer import default as packer_default
1113
from tarantool.msgpack_ext.unpacker import ext_hook as unpacker_ext_hook
1214

1315
from .lib.tarantool_server import TarantoolServer
1416
from .lib.skip import skip_or_run_datetime_test
15-
from tarantool.error import MsgpackError
1617

1718
class TestSuiteInterval(unittest.TestCase):
1819
@classmethod

test/suites/test_protocol.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import sys
2-
import pkg_resources
32
import unittest
43
import uuid
54

6-
import tarantool
7-
from tarantool.utils import greeting_decode, version_id
8-
9-
from .lib.tarantool_server import TarantoolServer
5+
import pkg_resources
106

7+
import tarantool
118
from tarantool.const import (
129
IPROTO_FEATURE_STREAMS,
1310
IPROTO_FEATURE_TRANSACTIONS,
1411
IPROTO_FEATURE_ERROR_EXTENSION,
1512
IPROTO_FEATURE_WATCHERS,
1613
)
14+
from tarantool.utils import greeting_decode, version_id
15+
16+
from .lib.tarantool_server import TarantoolServer
1717

1818
class TestSuiteProtocol(unittest.TestCase):
1919
@classmethod

test/suites/test_schema.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import sys
22
import unittest
3-
import tarantool
43
import pkg_resources
54

5+
import tarantool
6+
from tarantool.error import NotSupportedError
7+
68
from .lib.tarantool_server import TarantoolServer
79
from .lib.skip import skip_or_run_constraints_test
8-
from tarantool.error import NotSupportedError
910

1011

1112
# FIXME: I'm quite sure that there is a simpler way to count

test/suites/test_uuid.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
import sys
22
import unittest
33
import uuid
4-
import msgpack
54
import warnings
6-
import tarantool
75

6+
import msgpack
7+
8+
import tarantool
9+
from tarantool.error import MsgpackError, MsgpackWarning
810
from tarantool.msgpack_ext.packer import default as packer_default
911
from tarantool.msgpack_ext.unpacker import ext_hook as unpacker_ext_hook
1012

1113
from .lib.tarantool_server import TarantoolServer
1214
from .lib.skip import skip_or_run_uuid_test
13-
from tarantool.error import MsgpackError, MsgpackWarning
1415

1516
class TestSuiteUUID(unittest.TestCase):
1617
@classmethod

0 commit comments

Comments
 (0)