-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Python linter/formatter extensions don't support virtual workspaces #21459
Python linter/formatter extensions don't support virtual workspaces #21459
Comments
@Pokeylooted the GitHub Repositories extension serves file contents using a virtual file system, i.e. the files do not exist on disk: https://code.visualstudio.com/api/extension-guides/virtual-workspaces. If these linter/formatter extensions work by running a Python module against files in a workspace and don't already support virtual file systems, then that would be why they don't work in GitHub Repositories. This would then actually be an issue for the linter/formatter extensions to support virtual file systems. You mention isort not working, can you please provide the extension IDs that don't work in GitHub Repositories? |
Hey! Thanks for reaching, out I actually thought that too, and reached out to the developers of the extension: astral-sh/ruff-vscode#211 (comment) That's where I found other people with the same problem One of them mentioning the same with iSort. which can be recreated with this plugin: https://marketplace.visualstudio.com/items?itemName=ms-python.isort |
Virtual workspaces is not yet supported. I will update the extension with the right flags to indicate that. |
@charliermarsh Can you make similar change to Ruff extension? microsoft/vscode-black-formatter#256 |
Will do, thanks @karthiknadig. |
@alexr00 actually I think you've verified the fix, because previously these extensions were not disabled in virtual workspaces even though they didn't support them properly. @karthiknadig is working on allowing Python linters/formatters to work in virtual workspaces over LSP, so this issue in the meantime just ensures that the extensions don't do inappropriate things while they lack the ability to support virtual workspaces |
Issue:
Some extensions are failing to start, below is an example of Ruff.
Error message:
Steps to reproduce:
Note:
The Black Formatter and iSort extensions also exhibit the same issues.
iSort console output
Version - v0.58.0
Link to Ruff ruff issue about this
The text was updated successfully, but these errors were encountered: