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

Add Qualifier to Objects in Error Tooltips to Disambiguate Objects with the Same Name #1306

Closed
savannahostrowski opened this issue May 18, 2021 · 2 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

@savannahostrowski
Copy link
Contributor

savannahostrowski commented May 18, 2021

Environment data

  • Language Server version: 2021.5.2
  • OS and version: Windows
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8

Expected behaviour

It'd be nice to have a qualifier (e.g. class name) for objects in type error messages so that when there are incompatible types, it's easy to distinguish that different object are being compared.

Actual behaviour

image

Logs

N/A

Code Snippet / Additional information

N/A

  • I'm breaking my own rules and not filling out the template. 🙂 Please don't do this.
@erictraut
Copy link
Contributor

I've changed the code to detect the case where the X is incompatible with Y diagnostic message is misleading because types X and Y have the same short name. When this occurs, the fully-qualified name will be used instead, like this:

Screen Shot 2021-05-18 at 5 23 33 PM

@erictraut erictraut added enhancement New feature or request fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed triage labels May 19, 2021
@jakebailey
Copy link
Member

This issue has been fixed in version 2021.5.3, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202153-19-may-2021

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

3 participants