improved tooling (isort and flake8 with "black" compatibility)

This commit is contained in:
Jörn-Michael Miehe 2024-04-09 14:28:45 +02:00
parent b653ff00b2
commit 0f0287a402
3 changed files with 12 additions and 9 deletions

View file

@ -1,4 +1,4 @@
[flake8] [flake8]
max-line-length = 80 max-line-length = 80
select = C,E,F,I,W,B,B950 extend-select = B950
extend-ignore = E203, E501 extend-ignore = E203,E501,E701

3
.isort.cfg Normal file
View file

@ -0,0 +1,3 @@
[settings]
profile = "black"
line_length = 80

10
.vscode/settings.json vendored
View file

@ -1,20 +1,20 @@
{ {
"python.languageServer": "Pylance", "python.languageServer": "Pylance",
"editor.formatOnSave": true,
"[python]": { "[python]": {
"editor.defaultFormatter": "ms-python.black-formatter" "editor.formatOnSave": true,
}, "editor.defaultFormatter": "ms-python.black-formatter",
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.organizeImports": "explicit" "source.organizeImports": "explicit"
}, },
},
"git.closeDiffOnOperation": true, "git.closeDiffOnOperation": true,
"python.analysis.typeCheckingMode": "basic", "python.analysis.typeCheckingMode": "basic",
"python.analysis.diagnosticMode": "workspace", "python.analysis.diagnosticMode": "workspace",
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": [ "python.testing.pytestArgs": [
"--import-mode=importlib" "--import-mode=importlib"
], ],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"black-formatter.importStrategy": "fromEnvironment", "black-formatter.importStrategy": "fromEnvironment",
"flake8.importStrategy": "fromEnvironment", "flake8.importStrategy": "fromEnvironment",
} }