-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruff extension configured as formatter but does not actually format Python files #653
Comments
I'm sorry that you're running into this. Would you mind sharing the ruff extension logs with us?
Could you also try using a more recent version of ruff? |
Same here on two different vscode configurations on different laptops. I've already configured Ruff extension to use bundled Ruff as was mentioned in another issue I've found earlier. Doesn't help. |
I've recreated venv and now it works. Have no idea what that was 🤷♂ |
You can refer to the troubleshooting guide for that.
If possible, can you try removing the venv and see if it still works? It would be useful to know what this issue is about and how to resolve it. Do you have a |
I'll try to debug this on a second laptop. Yes, I always have ruff installed via |
I'm using a vscode workspace with multiple projects - each project has its own .venv. I'm not sure if this issue started appearing right after I switched to the vscode workspace project layout, or after that. However, while debugging this issue, I noticed that when I tried running the command "Ruff: Restart Server", Ruff complained that it couldn't find the Python executable in the root of my workspace (instead of using the one in the sub-project). Setting the ruff extension to use the bundled ruff did not help. What helped was:
{
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "charliermarsh.ruff"
}
} Is it possible that the ruff extension is not playing well with vscode workspaces? Related: #654 (but I'm developing locally, no remote server involved) |
Description:
I encountered a prompt in VSCode stating:
Additional Context:
VSCode version:
Version: 1.95.3
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Linux x64 6.8.0-49-generic
Ruff extension version:
ruff 0.6.8
Python version:
3.10.12
Operating system: Ubuntu Mate
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
The text was updated successfully, but these errors were encountered: