You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I work on the vscode-python extension, we have a isort extension based on LSP as mentioned here #1904.
We have few users complaining that the behavior they see with isort is different from what they expect. We don't really pass anything different between how we used to do it in vscode-python vs vscode-isort extensions. The only main difference is how they are invoked.
In vscode-python extension, we insert the path to isort bundled with the python extension and then call main on it.
I work on the vscode-python extension, we have a
isort
extension based on LSP as mentioned here #1904.We have few users complaining that the behavior they see with
isort
is different from what they expect. We don't really pass anything different between how we used to do it in vscode-python vs vscode-isort extensions. The only main difference is how they are invoked.In vscode-python extension, we insert the path to isort bundled with the python extension and then call main on it.
in vscode-python extension we get the diff and try to calculate the edits. The content of the file is passed in via stdin.
Where as in vscode-isort, we insert the path to isort bundled with the python extension and then call
runpy.run_module
on it.in vscode-isort extension we get the formatted content and use it directly. The content of the file is passed in via stdin.
So not really sure why there is any difference here. Full discussion here: microsoft/vscode-isort#53
Please let me know if there is a better API to call in a server like scenario.
The text was updated successfully, but these errors were encountered: