Skip to content

Commit 72a2ba4

Browse files
committed
docs: vscode interpreter spaced paths
Kiro and VS Code mangle the hatch interpreter path when it contains spaces, breaking "Select Interpreter". Document the `.venv` symlink workaround and split the existing VS Code section into Interpreter and Linting subsections.
1 parent 65035aa commit 72a2ba4

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,24 @@ echo "$(hatch env find)/bin/python"
139139
```
140140

141141
### VS Code
142+
#### Interpreter
142143
If you're using VS Code, "Python: Select Interpreter" and use the hatch venv Python interpreter
143144
as found with the `hatch env find` command.
144145

146+
Kiro and VS Code mangles the interpreter path if it contains spaces, which results in
147+
errors finding the interpreter. You can create a local .venv file symlink _without_ spaces
148+
in the path:
149+
150+
```bash
151+
# create a symlink at: ./.venv/bin/python
152+
rm -rf .venv && ln -s "$(hatch env find)" .venv
153+
```
154+
155+
When you "Select Interpreter", enter path `./.venv/bin/python`.
156+
157+
You'll have to rerun this command whenever you recreate your hatch envs.
158+
159+
#### Linting
145160
Hatch uses Ruff for static analysis.
146161

147162
You might want to install the [Ruff extension for VS Code](https://github.com/astral-sh/ruff-vscode)

0 commit comments

Comments
 (0)