-
Notifications
You must be signed in to change notification settings - Fork 767
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
Stub files - Auto-import shown for already imported symbols #685
Comments
@cdce8p can you give me more context/repro on this? creating blank a.py file and testing it doesn't repro it so it feels like it requires some setup to repro? |
@heejaechang I can still reproduce the error with pylance Here is what I did:
from typing import Union
My folder settings: {
"python.languageServer": "Pylance",
"python.analysis.typeCheckingMode": "strict",
} |
I experienced this when I was working on the matplotlib stubs last week; I think the completion provider is using the wrong symbol table when offering completions within stubs, using the one that contains symbols externally visible to other files, and not the table that is internally visible to the stub itself. In the above example, |
This issue has been fixed in version 2021.3.2, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202132-17-march-2021 |
Environment data
Expected behaviour
The
Auto-import
note should not be displayed for symbols which are already imported.Actual behaviour
Code Snippet / Additional information
From my testing, this seem to affect only stub files.
--
Same example in a normal python file
The text was updated successfully, but these errors were encountered: