-
Notifications
You must be signed in to change notification settings - Fork 9
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
Pylance gives no tooltips when creating instances of a dataclass #63
Comments
I learned that it is the Pylance extension that gives rise to this info box. There seemed to be two reasons for this not working.
I have implemented these changes in a fork: https://github.com/hugoake/dataclassy. I would open a pull request but I am not certain how the |
I'm currently trying to build an own dataclass-like framework and took a look at IDEs should really come up with better mechanisms to deal with such transforms, like a generic plugin API to tell analyzers where to look. On the other hand, I suppose that's harder than it sounds... |
See also microsoft/pyright#607 and davidhalter/jedi#1787 (both rejected, unfortunately :/) Interestingly, MyPy does have a plugin mechanism, but it is only a type checker, and not a language server. |
In VSCode,
dataclass
fromdataclasses
allows me to see the attributes of my dataclass when creating an object. For example, if I have a dataclass calledMyClass
and I write somewhereMyClass(
I would get a small box/widget next to my cursor specifying all the attributes and their types. This is extremely useful when I don't remember exactly the names of the attributes.The text was updated successfully, but these errors were encountered: