Skip to content

Commit de9e2cd

Browse files
committed
Configure isort and sort imports
1 parent 0178779 commit de9e2cd

File tree

11 files changed

+18
-16
lines changed

11 files changed

+18
-16
lines changed

database_sanitizer/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import unicode_literals
44

55
import importlib
6+
67
import six
78
import yaml
89

database_sanitizer/dump/mysql.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
get_mysqldump_args_and_env_from_url,
1313
)
1414

15-
1615
#: Regular expression which matches `INSERT INTO` statements produced by the
1716
#: `mysqldump` utility, even when extended inserts have been enabled.
1817
INSERT_INTO_PATTERN = re.compile(

database_sanitizer/dump/postgres.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from ..utils.postgres import decode_copy_value, encode_copy_value
1010

11-
1211
COPY_LINE_PATTERN = re.compile(
1312
r"^COPY \"(?P<schema>[^\"]*)\".\"(?P<table>[^\"]*)\" "
1413
r"\((?P<columns>.*)\) "

database_sanitizer/tests/test_config.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
from __future__ import unicode_literals
44

5-
import pytest
6-
75
from collections import namedtuple
86

9-
from ..config import Configuration, ConfigurationError
7+
import pytest
108

9+
from ..config import Configuration, ConfigurationError
1110
from ._compat import mock
1211

1312

database_sanitizer/tests/test_dump_mysql.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from __future__ import unicode_literals
44

55
import io
6-
import pytest
76

7+
import pytest
88
from six.moves.urllib import parse as urlparse
99

1010
from ..config import Configuration
@@ -15,7 +15,6 @@
1515
sanitize_from_stream,
1616
)
1717

18-
1918
MOCK_MYSQLDUMP_OUTPUT = b"""
2019
--- Fake MySQL database dump
2120

database_sanitizer/tests/test_dump_postgres.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@
33
from __future__ import unicode_literals
44

55
import io
6-
import pytest
7-
86
from collections import namedtuple
7+
8+
import pytest
99
from six.moves.urllib import parse as urlparse
1010

1111
from ..config import Configuration
12-
from ..dump.postgres import parse_column_names, parse_values, sanitize
1312
from ..dump import postgres as dump_postgres
13+
from ..dump.postgres import parse_column_names, parse_values, sanitize
1414
from ..utils.postgres import decode_copy_value
15-
1615
from ._compat import mock
1716

18-
1917
MOCK_PG_DUMP_OUTPUT = b"""
2018
--- Fake PostgreSQL database dump
2119

database_sanitizer/tests/test_utils_mysql.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import unicode_literals
44

55
import pytest
6-
76
from six.moves.urllib import parse as urlparse
87

98
from ..utils.mysql import (

database_sanitizer/tests/test_utils_postgres.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
import pytest
66

77
from ..utils.postgres import (
8-
decode_copy_value,
98
DECODE_MAP,
10-
encode_copy_value,
119
POSTGRES_COPY_NULL_VALUE,
10+
decode_copy_value,
11+
encode_copy_value,
1212
)
1313

1414

database_sanitizer/utils/mysql.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import unicode_literals
44

55
import re
6+
67
import six
78

89
try:

setup.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ console_scripts =
3030
[bdist_wheel]
3131
universal = 1
3232

33+
[isort]
34+
multi_line_output = 3
35+
include_trailing_comma = yes
36+
skip = .tox,dist,venv
37+
not_skip = __init__.py
38+
known_first_party = database_sanitizer
39+
default_section = THIRDPARTY
40+
3341
[coverage:run]
3442
branch = yes
3543

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44

55
import setuptools
66

7-
87
if __name__ == "__main__":
98
setuptools.setup(setup_requires=["setuptools>=34.0"])

0 commit comments

Comments
 (0)