Closed thernstig closed 8 months ago
With "isort.importStrategy" : "useBundled"
(which is default) it uses the one shipped in the extension.
This description needs to be updated.
So users who install an isort version themselves in a Python environment definitely should change it to fromEnvironment
?
I think it would be great if it worked like auto-discovery as another option i.e. "auto"
or "autoDiscover"
where it selects the one from the environment if it exists, otherwise the bundled one.
So users who install an isort version themselves in a Python environment definitely should change it to fromEnvironment?
Correct.
The fromEnvironment
scenario should work in the way where it attempts to load isort from the environment, and uses isort shipped with the extension as fallback.
@karthiknadig the VS Code Ruff extension prefers fromEnvironment
first (and also falls back) which is much more intuitive. Especially since you fall back.
Otherwise all projects who have workspace settings need to change this config, which they most likely want if they also run isort in CI.
We made some changes to the README to clarify how the settings work and the default values: https://github.com/microsoft/vscode-isort/blob/main/README.md. I'm closing this issue as addressed but let us know if there's still more clarifications we can make there and I can reopen 😊
And if you want you can also file a new feature request for adding an "auto"
value for importStrategy
so we can gauge interest from the community!
The README.md says:
Then further down it says the default setting is:
isort.importStrategy
useBundled
Doesn't these contradict eachother? With all default settings, does it use the isort found in the environment, or the one bundled with the extension?