Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 1ae492c

Browse files
author
David Robertson
authored
Move isort config to pyproject.toml (#12052)
1 parent d7cb0dc commit 1ae492c

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

changelog.d/12052.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Move `isort` configuration to `pyproject.toml`.

pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,15 @@ exclude = '''
5454
)/
5555
)
5656
'''
57+
58+
[tool.isort]
59+
line_length = 88
60+
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "TWISTED", "FIRSTPARTY", "TESTS", "LOCALFOLDER"]
61+
default_section = "THIRDPARTY"
62+
known_first_party = ["synapse"]
63+
known_tests = ["tests"]
64+
known_twisted = ["twisted", "OpenSSL"]
65+
multi_line_output = 3
66+
include_trailing_comma = true
67+
combine_as_imports = true
68+

setup.cfg

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,3 @@ ignore =
1919
# E731: do not assign a lambda expression, use a def
2020
# E501: Line too long (black enforces this for us)
2121
ignore=W503,W504,E203,E731,E501
22-
23-
[isort]
24-
line_length = 88
25-
sections=FUTURE,STDLIB,THIRDPARTY,TWISTED,FIRSTPARTY,TESTS,LOCALFOLDER
26-
default_section=THIRDPARTY
27-
known_first_party = synapse
28-
known_tests=tests
29-
known_twisted=twisted,OpenSSL
30-
multi_line_output=3
31-
include_trailing_comma=true
32-
combine_as_imports=true

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ commands =
166166

167167
[testenv:check_isort]
168168
extras = lint
169-
commands = isort -c --df --sp setup.cfg {[base]lint_targets}
169+
commands = isort -c --df {[base]lint_targets}
170170

171171
[testenv:check-newsfragment]
172172
skip_install = true

0 commit comments

Comments
 (0)