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

Is there a way to disable auto-imports? #64

Closed
PedroMDuarte opened this issue Jul 7, 2020 · 8 comments
Closed

Is there a way to disable auto-imports? #64

PedroMDuarte opened this issue Jul 7, 2020 · 8 comments
Labels
enhancement New feature or request fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@PedroMDuarte
Copy link

I find that I would prefer to have that option off by default.

@erictraut erictraut added the enhancement New feature or request label Jul 7, 2020
@savannahostrowski
Copy link
Contributor

Hey there @PedroMDuarte

Thanks for the suggestion. This is something that we are currently investigating. Stay tuned!

@jakebailey
Copy link
Member

Just to give an update here: We're planning on adding a setting to allow auto-import completions to be disabled, as well as modify the tooltips to make it more obvious what text changes the completions are going to make (i.e., the import that will be added to the top).

@jakebailey
Copy link
Member

This issue has been fixed in version 2020.8.0, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#202080-5-august-2020

@jakebailey
Copy link
Member

TL;DR, you can now set:

{
    "python.analysis.autoImportCompletions": false
}

To disable the auto-import completions if you prefer not to have them.

Note that the quick-fixes will still be available but still behind the lightbulb/"quick-fix" button (both of which VS Code should allow you to customize).

The aforementioned updates to the tooltips are coming, but will be incremental over time as we refine how they're presented.

@jakebailey
Copy link
Member

The updates to the tooltips are now released in 2020.9.0: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#202090-3-september-2020

For example:

MicrosoftTeams-image

@LoNicoM
Copy link

LoNicoM commented Apr 6, 2022

can't remember how many times i have had to delete "import imp" from the top of my files, due to a combination of using tab completion when trying to write imports, and the worst part is that its usually hidden, ie the page doesnt scroll up when its added.

@ghost
Copy link

ghost commented Apr 11, 2022

it is the worst lol

@danechitoaie
Copy link

I've been looking for this setting. It was so annoying. Happy that we can turn it off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

6 participants