From 2e167231a89e2d5bf27b14d133656703aaa8cc5a Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Wed, 29 Jan 2025 12:32:29 +0100 Subject: [PATCH] ENH: set Python path to `.venv/bin/python` (#509) --- .vscode/settings.json | 1 + src/compwa_policy/check_dev_files/vscode.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index d161228a..0483ed6c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -49,6 +49,7 @@ "notebook.formatOnSave.enabled": true, "python.analysis.autoImportCompletions": false, "python.analysis.inlayHints.pytestParameters": true, + "python.defaultInterpreterPath": ".venv/bin/python", "python.terminal.activateEnvironment": false, "python.testing.pytestArgs": ["--color=no", "--no-cov", "-vv"], "python.testing.pytestEnabled": true, diff --git a/src/compwa_policy/check_dev_files/vscode.py b/src/compwa_policy/check_dev_files/vscode.py index 5fb403ec..05011e30 100644 --- a/src/compwa_policy/check_dev_files/vscode.py +++ b/src/compwa_policy/check_dev_files/vscode.py @@ -84,7 +84,13 @@ def _update_settings(has_notebooks: bool, is_python_repo: bool) -> None: {"files.associations": {"**/.constraints/py*.txt": "pip-requirements"}}, ) if is_python_repo: - do(vscode.update_settings, {"rewrap.wrappingColumn": 88}) + do( + vscode.update_settings, + { + "python.defaultInterpreterPath": ".venv/bin/python", + "rewrap.wrappingColumn": 88, + }, + ) if CONFIG_PATH.envrc.exists(): do( vscode.update_settings,