From 0f0287a402c6c2b6b2911af007d7d3ca2fed912d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Tue, 9 Apr 2024 14:28:45 +0200 Subject: [PATCH] improved tooling (isort and flake8 with "black" compatibility) --- .flake8 | 4 ++-- .isort.cfg | 3 +++ .vscode/settings.json | 14 +++++++------- 3 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 .isort.cfg diff --git a/.flake8 b/.flake8 index 666e9d4..a77cb08 100644 --- a/.flake8 +++ b/.flake8 @@ -1,4 +1,4 @@ [flake8] max-line-length = 80 -select = C,E,F,I,W,B,B950 -extend-ignore = E203, E501 +extend-select = B950 +extend-ignore = E203,E501,E701 diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 0000000..cea3788 --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,3 @@ +[settings] +profile = "black" +line_length = 80 \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 3a2612b..59ec155 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,20 +1,20 @@ { "python.languageServer": "Pylance", - "editor.formatOnSave": true, "[python]": { - "editor.defaultFormatter": "ms-python.black-formatter" - }, - "editor.codeActionsOnSave": { - "source.organizeImports": "explicit" + "editor.formatOnSave": true, + "editor.defaultFormatter": "ms-python.black-formatter", + "editor.codeActionsOnSave": { + "source.organizeImports": "explicit" + }, }, "git.closeDiffOnOperation": true, "python.analysis.typeCheckingMode": "basic", "python.analysis.diagnosticMode": "workspace", + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true, "python.testing.pytestArgs": [ "--import-mode=importlib" ], - "python.testing.unittestEnabled": false, - "python.testing.pytestEnabled": true, "black-formatter.importStrategy": "fromEnvironment", "flake8.importStrategy": "fromEnvironment", } \ No newline at end of file