ruff
ruff copied to clipboard
Workspace edits from `ruff server` commands occasionally fail in VS Code when operating on an yet-to-be-created file
Steps to reproduce:
- Disable VS Code auto-save.
- Add
ALL
to theselect
setting in the extension - Create a new
.py
file, but don't save it yet. - Add this code to the file:
import foo
def bar():
unused = 4
- Using the command palette (Ctrl/Cmd+Shift+P), repeatedly run
ruff.applyAutofix
. - The second time you run
applyAutofix
, you should see an error about a workspace edit that couldn't be applied.