Quick fix uses 100% CPU and stalls vs code
Closed this issue · 3 comments
How to reproduce:
Open a file, write something without importing a library first like os.getenv()
, click "quick fix" on missing import name (on "os")
The bug:
Vs code starts to use 100% CPU, can't close itself, sometimes can't even save
Tested both with Remote: SSH and on local machine, the same story everywhere
I've also tested in almost empty directory, so it's probably not connected to astral-sh/ruff#11366
Tested in directory with pyproject, in empty directory, so it's the same
VS Code: (this also happened on version 1.85)
Version: 1.91.1
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:08:12.169Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.10.0-arch1-2
Ruff vs code:
v2024.44.0
Ruff:
2024-09-08 02:41:27.673 [info] Found Ruff 0.5.4 at /usr/bin/ruff
settings.json:
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
},
"python.languageServer": "Pylance",
"python.analysis.typeCheckingMode": "strict", # tested with on and off, still the same, but not 100% sure it deactivated
Python 3.12.4
This bug chased me for 6+ months, but I couldn't figure out the cause, and now, finally, I got it
So it's probably not something related to new changes
And I never actually tested with extension off, and... it's still happening. So probably not ruff's fault. For some reason I was sure it's this
I will close this as soon as I'm 100% sure it's not this extension
Yep, it's vs code, even without any extensions it's still happening