From 50d5ef3fee5ddd35efe63bd20d9d23d92c064dd3 Mon Sep 17 00:00:00 2001 From: andthum <56444687+andthum@users.noreply.github.com> Date: Tue, 2 Jan 2024 17:17:43 +0100 Subject: [PATCH 1/2] [extensions.json]: Add `ms-python.flake8` --- .vscode/extensions.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index eeb4bd7..a69e387 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -15,6 +15,7 @@ "KevinRose.vsc-python-indent", "lextudio.restructuredtext", "ms-python.black-formatter", + "ms-python.flake8", "ms-python.isort", "ms-python.python", "njpwerner.autodocstring", From 9cd42aac631c99f2e659ed16981efc7152afcccd Mon Sep 17 00:00:00 2001 From: andthum <56444687+andthum@users.noreply.github.com> Date: Tue, 2 Jan 2024 17:19:03 +0100 Subject: [PATCH 2/2] [settings.json]: Update Settings --- .vscode/settings.json | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index a82d931..05bacfa 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -156,6 +156,7 @@ // mypy. "**/.mypy_cache/": true, }, + "flake8.importStrategy": "fromEnvironment", "git.branchProtection": [ "main", "master", @@ -169,32 +170,14 @@ ], "git.enableCommitSigning": true, "isort.importStrategy": "fromEnvironment", - "[markdown]": { - // Markdown uses two or more spaces at the end of a line to - // signify a line break. - "files.trimTrailingWhitespace": false, - }, "markdown.extension.list.indentationSize": "inherit", "markdown.extension.print.absoluteImgPath": false, "markdown.extension.toc.levels": "2..3", "markdown.extension.toc.orderedList": true, "markdown.updateLinksOnFileMove.enabled": "prompt", "markdown.validate.enabled": true, - "[python]": { - // Somehow, the ms-python.isort removes blank lines before - // comments everywhere in the code. Therefore, sorting imports - // on file save is disabled for now. - // "editor.codeActionsOnSave": { - // // Format import statements with isort. - // "source.organizeImports": true, - // }, - "editor.defaultFormatter": "ms-python.black-formatter", - }, "python.defaultInterpreterPath": "python3", "python.envFile": "${workspaceFolder}/.venv-dev", - "python.formatting.provider": "none", - "python.linting.flake8Enabled": true, - "python.testing.pytestEnabled": true, "pythonIndent.trimLinesWithOnlyWhitespace": true, "restructuredtext.editor.listEditing.list.indentationSize": "inherit", "restructuredtext.preview.name": "docutils", @@ -202,10 +185,18 @@ "rewrap.doubleSentenceSpacing": true, "shellformat.flag": "--language-dialect=bash --indent=4 --case-indent --space-redirects", "shellformat.path": "${workspaceFolder}/.venv-dev/bin/shfmt", + "yaml.format.printWidth": 79, + "[markdown]": { + // Markdown uses two or more spaces at the end of a line to + // signify a line break. + "files.trimTrailingWhitespace": false, + }, + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter", + }, "[yaml]": { "editor.detectIndentation": false, "editor.insertSpaces": true, "editor.tabSize": 2, }, - "yaml.format.printWidth": 79, }