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

attrs created classes does not support __init__ args tooltips #816

Closed
gr4viton opened this issue May 9, 2018 · 1 comment
Closed

attrs created classes does not support __init__ args tooltips #816

gr4viton opened this issue May 9, 2018 · 1 comment

Comments

@gr4viton
Copy link

gr4viton commented May 9, 2018

Issue

The tooltip for instantiation of attrs-style defined class is not showing arg variables.

Steps to reproduce

Define class via attrs

from attr import attrs, attrib
@attrs
class Class()
   a = attrib()
   b = attrib(default=42)

Tooltip for class initialization shows:

     (...)
Class(

It would be more usefull if the init args tooltip shown the actual generated args.

     (a, b=42)
Class(

Though, not sure how difficult it would be to search for @attrs wrapper and parse the vars.

Also the attr.make_class can be used, where the __init__ args are defined in form of dict, which can possibly be even more difficult to parse.

Output of “:verbose JediDebugInfo”

N/A

@davidhalter
Copy link
Owner

This goes into the direction of davidhalter/jedi#626

I suppose that it will take at least a year, but it's not going to be possible without a plugin structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants