From 262bf9c6ad174864e7b923554b254b23984d2ed2 Mon Sep 17 00:00:00 2001 From: s3bc40 Date: Fri, 7 Mar 2025 10:44:27 +0100 Subject: [PATCH] feat: improve devcontainer setup environment - avoid ``"python.terminal.activateEnvironment": false,`` in ``.vscode/settings.json`` -> it should not activate locally if not checked in personal settings - add ``"python.terminal.activateEnvironment": true,`` in ``devcontainer.json`` -> now venv is activated in devcontainer terminal everytime - add ruff and better toml support in devcontainer for better vscode experience --- .devcontainer/devcontainer.json | 8 ++++++-- .vscode/settings.json | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 99840e7..2b2ad84 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,7 +9,9 @@ "extensions": [ "tintinweb.vscode-vyper", "trailofbits.weaudit", - "ms-python.python" + "ms-python.python", + "charliermarsh.ruff", + "tamasfe.even-better-toml" ], "settings": { "terminal.integrated.defaultProfile.linux": "zsh", @@ -17,7 +19,9 @@ "zsh": { "path": "/usr/bin/zsh" } - } + }, + "python.terminal.activateEnvironment": true, + "python.defaultInterpreterPath": ".venv/bin/python" } } }, diff --git a/.vscode/settings.json b/.vscode/settings.json index 7d7a9ca..174d029 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,6 +6,5 @@ "files.exclude": { "**/__pycache__": true }, - "python.terminal.activateEnvironment": false, "python.terminal.executeInFileDir": true } \ No newline at end of file