Skip to content

Commit 8e95ea9

Browse files
[py] moved isort, black and docformatter settings from tox.ini file to pyproject.toml (#14671)
* moved isort,black and docformatter settings to pyproject.toml * moved isort, black and docformatter settings to pyproject.toml * removed redundant pytest settings from setup.cfg
1 parent e9e684d commit 8e95ea9

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

Diff for: py/pyproject.toml

+16
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,19 @@ ignore_missing_imports = true
6161
[[tool.mypy._winreg]]
6262
# suppress error messages about imports that cannot be resolved.
6363
ignore_missing_imports = true
64+
65+
[tool.isort]
66+
# isort is a common python tool for keeping imports nicely formatted.
67+
# Automatically keep imports alphabetically sorted, on single lines in
68+
# PEP recommended sections (https://peps.python.org/pep-0008/#imports)
69+
# files or individual lines can be ignored via `# isort:skip|# isort:skip_file`.
70+
profile = "black"
71+
py_version=38
72+
force_single_line = true
73+
74+
[tool.black]
75+
line-length = 120
76+
target-version = ['py38']
77+
78+
[tool.docformatter]
79+
recursive = true

Diff for: py/setup.cfg

-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,3 @@ exclude = .tox,docs/source/conf.py,*venv
44
extend-ignore = E501, E203
55
# This does nothing for now as E501 is ignored.
66
max-line-length = 120
7-
8-
[tool:pytest]
9-
addopts = -ra
10-
python_files = test_*.py *_tests.py
11-
testpaths = test

Diff for: py/tox.ini

-11
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,6 @@ deps =
2525
trio-typing==0.7.0
2626
commands = mypy --install-types {posargs}
2727

28-
29-
[isort]
30-
; isort is a common python tool for keeping imports nicely formatted.
31-
; Automatically keep imports alphabetically sorted, on single lines in
32-
; PEP recommended sections (https://peps.python.org/pep-0008/#imports)
33-
; files or individual lines can be ignored via `# isort:skip|# isort:skip_file`.
34-
profile = black
35-
py_version=38
36-
force_single_line = True
37-
38-
3928
[testenv:linting-ci]
4029
; checks linting for CI with stricter exiting when failing.
4130
skip_install = true

0 commit comments

Comments
 (0)