Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to only execute isort without executing any other organizeImports provider? #112

Closed
Spenhouet opened this issue Sep 22, 2022 · 2 comments
Labels
triage-needed Issue is not triaged.

Comments

@Spenhouet
Copy link

When I enable organizeImports, the code starts dancing on every save.

82044600-ebee6800-96ad-11ea-8da6-9e019d567c18

That is the line of code:

from transform_data import (preprocess_continous_image, transform_image_parallelized,
                            weighted_majority_resampling)

My config:

"[python]": {
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
      "source.organizeImports": true
    }
  },
  "python.formatting.provider": "yapf",
  "python.formatting.yapfArgs": [
    "--style",
    "{based_on_style: google, column_limit: 100}"
  ],

In 15. May 2020 I already reported this here: microsoft/vscode#83586 (comment)

One conclusion seems to be that one currently cannot choose what organizeImports provider one actually wants to run and there is more than just isort running (microsoft/vscode#90221).

Since this was ignored previously, how can I just run isort without running anything else to avoid the above issue?

@github-actions github-actions bot added the triage-needed Issue is not triaged. label Sep 22, 2022
@karthiknadig
Copy link
Member

Try adding "isort.args": ["--profile", "google"] setting.

@Spenhouet
Copy link
Author

Also just noticed that this makes it stable in this case. Will need to see if this works in all cases. Will reopen an issue should I have a new reporduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-needed Issue is not triaged.
Projects
None yet
Development

No branches or pull requests

2 participants