Problem
Python's organize import code actions currently only work if you have an active text editor: https://github.com/Microsoft/vscode-python/blob/f7b5c4fa6f58d9c8997df2c88fef2e97a308a385/src/client/sortImports.ts#L8
This means that we can not apply the organize imports action to background files. This breaks this extension and may also break liveshare scenarios
Proposed fix
The code action could pass the document uri to this comment so that the active editor is not required. (may also require switching to using WorkspaceEdit)
Problem
Python's organize import code actions currently only work if you have an active text editor: https://github.com/Microsoft/vscode-python/blob/f7b5c4fa6f58d9c8997df2c88fef2e97a308a385/src/client/sortImports.ts#L8
This means that we can not apply the organize imports action to background files. This breaks this extension and may also break liveshare scenarios
Proposed fix
The code action could pass the document uri to this comment so that the active editor is not required. (may also require switching to using
WorkspaceEdit)