Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/getting_started/installation_troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,25 @@ This page provides guidance on how to troubleshoot common issues that may arise

This will enable the legacy cryptographic algorithms, including RIPEMD160. See [ethereum/execution-specs#506](https://github.com/ethereum/execution-specs/issues/506) for more information.

## Problem: VS Code "Autoformat on Save" with Ruff Not Working

!!! danger "Problem: 'Autoformat on Save' with Ruff not working as expected in VS Code"
If you are using VS Code and "autoformat on save" is not working as expected, or if it produces different formatting than the official `tox -e lint` command, you may have a version mismatch with the `ruff` formatter. This problem can be confirmed if `git diff` shows changes to an otherwise unmodified file after you have saved it.

This issue often occurs when VS Code is not configured to use the project's virtual environment (`.venv`) or if the linting dependencies have not been installed. In this case, VS Code's Ruff extension falls back to a bundled version of `ruff`, which may not match the version pinned in the project's `pyproject.toml` file.

!!! success "Solution: Install all required dependencies and select the correct interpreter"

1. Ensure all dependencies are installed, including the `lint` extras.

```bash
uv sync --all-extras
```

2. In VS Code, open the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P`) and select `Python: Select Interpreter`.

3. Choose the interpreter located in the project's `.venv` directory. This ensures VS Code uses the correct `ruff` version from your project's environment.

## Other Issues Not Listed?

If you're facing an issue that's not listed here, you can easily report it on GitHub for resolution.
Expand Down
Loading