-
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
from X import Y as Z
highlights Y
as undefined with semantic highlighting enabled
#376
Comments
@syagev, could you please send the logs from the output window? Also if you can also add a screenshot that would be helpful. Does dataframe work normally in the rest of file regardless of the message |
Updated the issue body. Sorry for missing those details. The import line itself runs well, and I should also note I'm pretty sure this is a regression from a previous version. I've been using PyLance on this codebase pretty much since it's first day, and that import was always there so I probably would have noticed it. |
To clarify, we're not asking if the code runs, but if you get completion for things inside of I'm guessing yes based on that screenshot, and this is a bug similar to #322. If you set this and reload, does the problem go away? {
"[python]": {
"editor.semanticHighlighting.enabled": false
}
} |
Ah. Yes, I'm getting completions for that module. And yes, adding that setting made the problem go away! Thanks ;) |
Thanks for checking. This seems like #322, then, though a different AST node is being processed. |
from dask import dataframe
flagged although existsfrom X import Y as Z
highlights Y
as undefined with semantic highlighting enabled
I got the same flagging with
|
I've implemented a fix, and it will be in the next release of Pylance. |
Yep, just to add to the conversation... In a Django project, I get the same using this import: from django.contrib.auth import views as auth_views Ordinary ImportAliased ImportHovering over the squiggly line, it says: I'll assume by the label that this will be fixed upon next release. This is just in case anyone else comes up against this. |
This issue has been fixed in version 2020.9.7, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#202097-30-september-2020 |
Environment data
Expected behaviour
Importing
dataframe
from the popular 3rd party library Dask should not be flagged. The code works when running.Actual behaviour
from dask import dataframe
is flagged withreportUndefinedVariable
Logs
Logs
The text was updated successfully, but these errors were encountered: