Browse Source

Move isort config to `pyproject.toml` (#12052)

tags/v1.54.0rc1
David Robertson 2 years ago
committed by GitHub
parent
commit
1ae492c8c0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 12 deletions
  1. +1
    -0
      changelog.d/12052.misc
  2. +12
    -0
      pyproject.toml
  3. +0
    -11
      setup.cfg
  4. +1
    -1
      tox.ini

+ 1
- 0
changelog.d/12052.misc View File

@@ -0,0 +1 @@
Move `isort` configuration to `pyproject.toml`.

+ 12
- 0
pyproject.toml View File

@@ -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


+ 0
- 11
setup.cfg View File

@@ -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

+ 1
- 1
tox.ini View File

@@ -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


Loading…
Cancel
Save