Skip to content

Commit 5b003ee

Browse files
committed
Configure and run isort
1 parent 6fb204c commit 5b003ee

25 files changed

Lines changed: 65 additions & 51 deletions

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
line-length = 99
33
target-version = ['py36']
44
skip-string-normalization = true
5+
6+
[tool.isort]
7+
profile = "black"
8+
multi_line_output = 3

requirements-dev.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ black~=21.4b1; platform_python_implementation != "PyPy"
22
flake8
33
flake8-docstrings
44
hacking
5+
isort
56
mock
67
pip-tools
78
pytest

requirements-dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ idna==2.10
3434
# via requests
3535
iniconfig==1.1.1
3636
# via pytest
37+
isort==5.8.0
38+
# via -r requirements-dev.in
3739
mccabe==0.6.1
3840
# via flake8
3941
mock==4.0.3

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/usr/bin/env python
22

3-
from setuptools import setup
43
import codecs
54
import os.path
65

6+
from setuptools import setup
7+
78

89
def read(rel_path):
910
here = os.path.abspath(os.path.dirname(__file__))

test/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import json
22
import os
3-
import pytest
4-
import responses
53
import sys
64

5+
import pytest
6+
import responses
77

88
# make files under helpers available for import
99
HELPERS_PATH = os.path.join(os.path.dirname(__file__), 'helpers')

test/helpers/infra.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
from upcloud_api import CloudManager, Storage, FirewallRule, Tag, IPAddress
1+
from upcloud_api import CloudManager, FirewallRule, IPAddress, Storage, Tag
22
from upcloud_api.server import Server, login_user_block
33

4-
54
CLUSTER = {
65
'web1': Server(
76
core_number=1,

test/test_apidoc/test_10_ip_addresses.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
from upcloud_api import IPAddress, Server
2-
from conftest import Mock, read_from_file
31
import json
2+
43
import responses
4+
from conftest import Mock, read_from_file
5+
6+
from upcloud_api import IPAddress, Server
57

68

79
class TestIP:

test/test_cloud_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from conftest import Mock
21
import json
2+
33
import responses
4+
from conftest import Mock
45

56

67
class TestCloudManagerBasic:

test/test_firewall.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
from upcloud_api import FirewallRule
2-
3-
from conftest import Mock
41
import json
2+
53
import responses
4+
from conftest import Mock
5+
6+
from upcloud_api import FirewallRule
67

78

89
def firewall_rule_callback(request):

test/test_host.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from conftest import Mock
21
import responses
2+
from conftest import Mock
33

44

55
class TestHost:

0 commit comments

Comments
 (0)