From ea9301aa9ee66f074e045ea52a3a53e8094c8eb6 Mon Sep 17 00:00:00 2001 From: Christopher Masto Date: Wed, 4 Dec 2024 04:39:54 -0500 Subject: [PATCH] Fix Visual Studio Code tasks to use selected Python interpreter (#132219) --- .vscode/tasks.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 1f95c5eef8f..7425e7a2533 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -16,7 +16,7 @@ { "label": "Pytest", "type": "shell", - "command": "python3 -m pytest --timeout=10 tests", + "command": "${command:python.interpreterPath} -m pytest --timeout=10 tests", "dependsOn": ["Install all Test Requirements"], "group": { "kind": "test", @@ -31,7 +31,7 @@ { "label": "Pytest (changed tests only)", "type": "shell", - "command": "python3 -m pytest --timeout=10 --picked", + "command": "${command:python.interpreterPath} -m pytest --timeout=10 --picked", "group": { "kind": "test", "isDefault": true @@ -89,7 +89,7 @@ "label": "Code Coverage", "detail": "Generate code coverage report for a given integration.", "type": "shell", - "command": "python3 -m pytest ./tests/components/${input:integrationName}/ --cov=homeassistant.components.${input:integrationName} --cov-report term-missing --durations-min=1 --durations=0 --numprocesses=auto", + "command": "${command:python.interpreterPath} -m pytest ./tests/components/${input:integrationName}/ --cov=homeassistant.components.${input:integrationName} --cov-report term-missing --durations-min=1 --durations=0 --numprocesses=auto", "dependsOn": ["Compile English translations"], "group": { "kind": "test", @@ -105,7 +105,7 @@ "label": "Update syrupy snapshots", "detail": "Update syrupy snapshots for a given integration.", "type": "shell", - "command": "python3 -m pytest ./tests/components/${input:integrationName} --snapshot-update", + "command": "${command:python.interpreterPath} -m pytest ./tests/components/${input:integrationName} --snapshot-update", "dependsOn": ["Compile English translations"], "group": { "kind": "test", @@ -163,7 +163,7 @@ "label": "Compile English translations", "detail": "In order to test changes to translation files, the translation strings must be compiled into Home Assistant's translation directories.", "type": "shell", - "command": "python3 -m script.translations develop --all", + "command": "${command:python.interpreterPath} -m script.translations develop --all", "group": { "kind": "build", "isDefault": true @@ -173,7 +173,7 @@ "label": "Run scaffold", "detail": "Add new functionality to a integration using a scaffold.", "type": "shell", - "command": "python3 -m script.scaffold ${input:scaffoldName} --integration ${input:integrationName}", + "command": "${command:python.interpreterPath} -m script.scaffold ${input:scaffoldName} --integration ${input:integrationName}", "group": { "kind": "build", "isDefault": true @@ -183,7 +183,7 @@ "label": "Create new integration", "detail": "Use the scaffold to create a new integration.", "type": "shell", - "command": "python3 -m script.scaffold integration", + "command": "${command:python.interpreterPath} -m script.scaffold integration", "group": { "kind": "build", "isDefault": true