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", 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, }