From 9d2974397c5cf8ffa675b5df4d7f829d45268862 Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Tue, 9 Jan 2024 16:21:56 +0100 Subject: [PATCH] tooling: update VS Code configuration --- .vscode/extensions.json | 11 ++++++++++ .vscode/settings.json | 46 ++++++++++++++++++++--------------------- .vscode/tasks.json | 37 +++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 23 deletions(-) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..5740171a --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,11 @@ +{ + "recommendations": [ + "ms-python.python", + "ms-python.black-formatter", + "ms-python.flake8", + "ms-python.isort", + "njpwerner.autodocstring", + "redhat.vscode-yaml", + "zhoufeng.pyqt-integration" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index c5fe4176..2bb14e11 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,41 +1,41 @@ { // Editor "editor.bracketPairColorization.enabled": true, - "editor.codeActionsOnSave": { - "source.organizeImports": true - }, "editor.guides.bracketPairs": "active", "editor.formatOnSave": true, - "editor.rulers": [ - 88 - ], - "editor.wordWrapColumn": 88, "files.associations": { "./requirements/*.txt": "pip-requirements", - "metadata.txt": "ini" + "metadata.txt": "ini", + "**/*.ts": "xml", + "**/*.ui": "xml" + }, + // Python + "python.analysis.autoFormatStrings": true, + "python.analysis.typeCheckingMode": "basic", + "python.terminal.activateEnvInCurrentTerminal": true, + "python.terminal.activateEnvironment": true, + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter", + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.organizeImports": "explicit" + }, + "editor.rulers": [ + 88 + ], + "editor.wordWrapColumn": 88, }, - // Formatter - "python.formatting.provider": "black", - "python.formatting.blackArgs": [ - "--target-version=py39" - ], - // Linter - "python.linting.enabled": true, - "python.linting.flake8Enabled": true, - "python.linting.flake8Args": [ - "--config=setup.cfg", - "--verbose" - ], - "python.linting.pylintEnabled": false, // Tests "python.testing.pytestArgs": [], "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, - // Git - "git.enableCommitSigning": true, // Extensions "autoDocstring.docstringFormat": "sphinx", "autoDocstring.guessTypes": true, + "flake8.args": [ + "--config=setup.cfg", + "--verbose" + ], "yaml.schemas": { "https://json.schemastore.org/github-workflow.json": ".github/workflows/*.yml" } diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..217118ef --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,37 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Upgrade dependencies - Development", + "type": "shell", + "osx": { + "command": "${config:python.pythonPath} -m pip install -U -r requirements/development.txt" + }, + "windows": { + "command": "${config:python.pythonPath} -m pip install -U -r requirements/development.txt" + }, + "linux": { + "command": "${config:python.pythonPath} -m pip install -U -r requirements/development.txt" + }, + "problemMatcher": [] + }, + { + "label": "Translation Update", + "type": "shell", + "linux": { + "command": "pylupdate5 -verbose qgis_resource_sharing/resources/i18n/plugin_translation.pro" + }, + "problemMatcher": [] + }, + { + "label": "Translation Compile", + "type": "shell", + "linux": { + "command": "lrelease qgis_resource_sharing/resources/i18n/*.ts " + }, + "problemMatcher": [] + } + ] +}