Skip to content

Commit 929fcdf

Browse files
pylint: fix wrong-import-position cases
Fix all cases of C0413 wrong-import-position. Part of #270
1 parent 8b1813f commit 929fcdf

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

docs/source/conf.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# pylint: disable=invalid-name
1212

1313
import sys, os
14+
import tarantool
1415

1516
# If extensions (or modules to document with autodoc) are in another directory,
1617
# add these directories to sys.path here. If the directory is relative to the
@@ -53,8 +54,6 @@
5354
# |version| and |release|, also used in various other places throughout the
5455
# built documents.
5556

56-
import tarantool
57-
5857
# The short X.Y version.
5958
version = tarantool.__version__
6059
# The full version, including alpha/beta/rc tags.

tarantool/utils.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
from base64 import decodebytes as base64_decode
12
import sys
23
import uuid
34

45
ENCODING_DEFAULT = "utf-8"
56

6-
from base64 import decodebytes as base64_decode
7-
87
def strxor(rhs, lhs):
98
"""
109
XOR two strings.

test/suites/__init__.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import os
22
import unittest
33

4-
__tmp = os.getcwd()
5-
os.chdir(os.path.abspath(os.path.dirname(__file__)))
6-
74
from .test_schema import TestSuiteSchemaUnicodeConnection
85
from .test_schema import TestSuiteSchemaBinaryConnection
96
from .test_dml import TestSuiteRequest
@@ -40,6 +37,8 @@ def load_tests(loader, tests, pattern):
4037
suite.addTests(loader.loadTestsFromTestCase(testc))
4138
return suite
4239

40+
__tmp = os.getcwd()
41+
os.chdir(os.path.abspath(os.path.dirname(__file__)))
4342

4443
os.chdir(__tmp)
4544

test/suites/test_package.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
import sys
33
import unittest
44

5+
import tarantool
6+
57
if sys.version_info >= (3, 8):
68
from importlib import metadata
79
else:
810
import importlib_metadata as metadata
911

10-
import tarantool
11-
1212

1313
def is_test_pure_install():
1414
env = os.getenv("TEST_PURE_INSTALL")

0 commit comments

Comments
 (0)