VS Code configuration like the following will work as expected:
{
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
},
}
}
but this configuration:
{
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports.ruff": "explicit",
},
}
}
does not work.
The problem here is that when we create the source code action, the kind is always set to source.{fixAll | organizeImports}. Since the client is expected a code action of kind source.{fixAll | organizeImports}.ruff, the code action we return will not get resolved.
VS Code configuration like the following will work as expected:
{ "[python]": { "editor.codeActionsOnSave": { "source.organizeImports": "explicit", }, } }but this configuration:
{ "[python]": { "editor.codeActionsOnSave": { "source.organizeImports.ruff": "explicit", }, } }does not work.
The problem here is that when we create the source code action, the kind is always set to
source.{fixAll | organizeImports}. Since the client is expected a code action of kindsource.{fixAll | organizeImports}.ruff, the code action we return will not get resolved.