Skip to content

isort extension crashes when scoped source.organzeImports action is present #192

@charliermarsh

Description

@charliermarsh

👋 I'm trying to add a source.organizeImports.ruff action to the Ruff extension. The goal is to enable users who have the isort extension installed to opt-in to sorting imports with Ruff instead, like this:

{
    "[python]": {
        "editor.formatOnSave": false,
        "editor.codeActionsOnSave": {
            "source.organizeImports.ruff": true
        }
    }
}

However, when the isort extension is installed, this configuration causes the isort extension to crash repeatedly, and impedes the Ruff extension's import sorting somehow. (If I uninstall the isort extension, the Ruff extension works as expected.)

(This started with an issue in the Ruff extension repo: astral-sh/ruff-vscode#76. The use of provider-scoped source.organizeImports was inspired by what I've seen with the ESLint extension, and in this issue: microsoft/vscode#90221.)

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions