diff options
author | David Robertson <davidr@element.io> | 2022-02-22 10:37:23 +0000 |
---|---|---|
committer | David Robertson <davidr@element.io> | 2022-02-22 10:37:23 +0000 |
commit | 079a68d223c59b14679ac5ad03c59210f74e444a (patch) | |
tree | 9c77308c2c190bcff2882b3abd46db0e940fbf6b | |
parent | Changelog (diff) | |
parent | Let isort find pyproject.toml by itself (diff) | |
download | synapse-github/dmr/poetry-pieces.tar.xz |
Merge branch 'dmr/isort-config' into dmr/poetry-pieces github/dmr/poetry-pieces dmr/poetry-pieces
-rw-r--r-- | changelog.d/12052.misc | 1 | ||||
-rw-r--r-- | pyproject.toml | 12 | ||||
-rw-r--r-- | setup.cfg | 11 | ||||
-rw-r--r-- | tox.ini | 2 |
4 files changed, 14 insertions, 12 deletions
diff --git a/changelog.d/12052.misc b/changelog.d/12052.misc new file mode 100644 index 0000000000..fbaff67e95 --- /dev/null +++ b/changelog.d/12052.misc @@ -0,0 +1 @@ +Move `isort` configuration to `pyproject.toml`. diff --git a/pyproject.toml b/pyproject.toml index 963f149c6a..c9cd0cf6ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,3 +54,15 @@ exclude = ''' )/ ) ''' + +[tool.isort] +line_length = 88 +sections = ["FUTURE", "STDLIB", "THIRDPARTY", "TWISTED", "FIRSTPARTY", "TESTS", "LOCALFOLDER"] +default_section = "THIRDPARTY" +known_first_party = ["synapse"] +known_tests = ["tests"] +known_twisted = ["twisted", "OpenSSL"] +multi_line_output = 3 +include_trailing_comma = true +combine_as_imports = true + diff --git a/setup.cfg b/setup.cfg index e5ceb7ed19..a0506572d9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,14 +19,3 @@ ignore = # E731: do not assign a lambda expression, use a def # E501: Line too long (black enforces this for us) ignore=W503,W504,E203,E731,E501 - -[isort] -line_length = 88 -sections=FUTURE,STDLIB,THIRDPARTY,TWISTED,FIRSTPARTY,TESTS,LOCALFOLDER -default_section=THIRDPARTY -known_first_party = synapse -known_tests=tests -known_twisted=twisted,OpenSSL -multi_line_output=3 -include_trailing_comma=true -combine_as_imports=true diff --git a/tox.ini b/tox.ini index 41678aa38b..436ecf7552 100644 --- a/tox.ini +++ b/tox.ini @@ -166,7 +166,7 @@ commands = [testenv:check_isort] extras = lint -commands = isort -c --df --sp setup.cfg {[base]lint_targets} +commands = isort -c --df {[base]lint_targets} [testenv:check-newsfragment] skip_install = true |