Skip to content

Commit 7e05a20

Browse files
committed
feat(tasks): add shell task for check-python with venv activation
1 parent dc7f9bf commit 7e05a20

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.vscode/tasks.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,30 @@
3333
"problemMatcher": [],
3434
"label": "preTestJediLSP"
3535
},
36+
{
37+
"label": "npm: check-python",
38+
"type": "shell",
39+
"command": "bash",
40+
"args": ["-lc", "source .venv/bin/activate && npm run check-python"],
41+
"problemMatcher": [],
42+
"detail": "Runs in the repo .venv (avoids pyenv/shim Python): npm run check-python",
43+
"windows": {
44+
"command": "pwsh",
45+
"args": [
46+
"-NoProfile",
47+
"-ExecutionPolicy",
48+
"Bypass",
49+
"-Command",
50+
".\\.venv\\Scripts\\Activate.ps1; npm run check-python"
51+
]
52+
}
53+
},
3654
{
3755
"type": "npm",
3856
"script": "check-python",
3957
"problemMatcher": ["$python"],
40-
"label": "npm: check-python",
41-
"detail": "npm run check-python:ruff && npm run check-python:pyright"
58+
"label": "npm: check-python (no venv)",
59+
"detail": "Runs without activating .venv (uses the task shell's default python): npm run check-python"
4260
}
4361
]
4462
}

0 commit comments

Comments
 (0)