From 7e05a2076ee2cfe6da964ec7197abf153b1ca13a Mon Sep 17 00:00:00 2001 From: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com> Date: Thu, 18 Dec 2025 12:13:00 -0800 Subject: [PATCH 1/2] feat(tasks): add shell task for check-python with venv activation --- .vscode/tasks.json | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 0e33420c11db..b4d30345f43b 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -33,12 +33,30 @@ "problemMatcher": [], "label": "preTestJediLSP" }, + { + "label": "npm: check-python", + "type": "shell", + "command": "bash", + "args": ["-lc", "source .venv/bin/activate && npm run check-python"], + "problemMatcher": [], + "detail": "Runs in the repo .venv (avoids pyenv/shim Python): npm run check-python", + "windows": { + "command": "pwsh", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-Command", + ".\\.venv\\Scripts\\Activate.ps1; npm run check-python" + ] + } + }, { "type": "npm", "script": "check-python", "problemMatcher": ["$python"], - "label": "npm: check-python", - "detail": "npm run check-python:ruff && npm run check-python:pyright" + "label": "npm: check-python (no venv)", + "detail": "Runs without activating .venv (uses the task shell's default python): npm run check-python" } ] } From ecc35078a23644b3ee8513dd4da377abe153bcac Mon Sep 17 00:00:00 2001 From: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com> Date: Thu, 18 Dec 2025 12:19:46 -0800 Subject: [PATCH 2/2] switch to non venv as default --- .vscode/tasks.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index b4d30345f43b..c5a054ed43cf 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -34,12 +34,19 @@ "label": "preTestJediLSP" }, { + "type": "npm", + "script": "check-python", + "problemMatcher": ["$python"], "label": "npm: check-python", + "detail": "npm run check-python:ruff && npm run check-python:pyright" + }, + { + "label": "npm: check-python (venv)", "type": "shell", "command": "bash", "args": ["-lc", "source .venv/bin/activate && npm run check-python"], "problemMatcher": [], - "detail": "Runs in the repo .venv (avoids pyenv/shim Python): npm run check-python", + "detail": "Activates the repo .venv first (avoids pyenv/shim Python) then runs: npm run check-python", "windows": { "command": "pwsh", "args": [ @@ -50,13 +57,6 @@ ".\\.venv\\Scripts\\Activate.ps1; npm run check-python" ] } - }, - { - "type": "npm", - "script": "check-python", - "problemMatcher": ["$python"], - "label": "npm: check-python (no venv)", - "detail": "Runs without activating .venv (uses the task shell's default python): npm run check-python" } ] }