-
Notifications
You must be signed in to change notification settings - Fork 771
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
Expand type alias for completion provider #562
Comments
We've put a lot of effort into making sure we can preserve the names all the way up to the tooltips, as the names are often more readable than the full expansion (especially for big union types like numpy's I can't really see us wanting to undo this, at least not by default. (Maybe a toggle? Unsure.) |
If you hover over the alias symbol (e.g. |
That's a good point, I do agree that |
Yes, good point. The completion provider logic should have the same logic as the hover text provider with respect to type aliases. |
This issue has been fixed in version 2020.11.2, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#2020112-18-november-2020 |
Environment data
Actual behaviour
Given the code snippet below, Pylance will only suggest
AliasT
as type hint forvar
.dict[int, str]
is hidden.Expected/Suggested behaviour
I often find it useful to directly see the type I'm working with. The type alias is mainly used to keep the code readable and avoid small mistakes when repeatedly writing the type. It might be an idea to display the final type information with the type hit. Some ideas:
Code Snippet / Additional information
The text was updated successfully, but these errors were encountered: