Skip to content

fix(scaffold): use cross-platform venv path in vscode settings#100

Merged
qjrm1430 merged 1 commit into
mainfrom
fix/scaffold-vscode-interpreter-path
May 27, 2026
Merged

fix(scaffold): use cross-platform venv path in vscode settings#100
qjrm1430 merged 1 commit into
mainfrom
fix/scaffold-vscode-interpreter-path

Conversation

@qjrm1430
Copy link
Copy Markdown
Member

Summary

  • Drop the OS-specific bin/python suffix from python.defaultInterpreterPath in the scaffold's .vscode/settings.json
  • Python extension now auto-resolves the interpreter for both Windows (Scripts/python.exe) and Linux/macOS (bin/python)

Test plan

  • Generate a project via act new on Linux and confirm VS Code picks up .venv/bin/python
  • Generate a project on Windows and confirm VS Code picks up .venv/Scripts/python.exe

🤖 Generated with Claude Code

Drop the OS-specific bin/python suffix so Python extension auto-resolves
the interpreter on both Windows (Scripts/python.exe) and Linux/macOS
(bin/python).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the VS Code settings template for scaffolded projects. It modifies the python.defaultInterpreterPath to point to the .venv directory instead of the Python executable. Feedback suggests removing this setting entirely, as pointing to a directory is invalid for the VS Code Python extension, and standard virtual environments like .venv are already auto-detected across platforms.

Comment on lines +20 to 21
"python.defaultInterpreterPath": "${workspaceFolder}/.venv",
"python.testing.pytestEnabled": true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Setting python.defaultInterpreterPath to a directory (${workspaceFolder}/.venv) is invalid because the VS Code Python extension expects a path to the Python executable (e.g., bin/python or Scripts/python.exe). Pointing it to a directory will cause VS Code to fail to resolve the interpreter, leading to errors when running Python tools, tests, or formatters.

Since the VS Code Python extension automatically detects standard virtual environments like .venv in the workspace root on all platforms (Windows, macOS, and Linux), the best cross-platform solution is to omit this setting entirely.

Suggested change
"python.defaultInterpreterPath": "${workspaceFolder}/.venv",
"python.testing.pytestEnabled": true,
"python.testing.pytestEnabled": true,

@qjrm1430 qjrm1430 merged commit 7cf399b into main May 27, 2026
3 checks passed
@qjrm1430 qjrm1430 deleted the fix/scaffold-vscode-interpreter-path branch May 27, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant