-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
TypedDict argument autocompletion #1740
Comments
If you want to work on this playing with However I'm only going to merge this if there are no hacks/heuristics in there. |
I underestimated the amount of work it would take on my end to get this feature implemented and don't really have the time to work on this given my current workload. I've sponsored you and it would be much appreciated if you could try and get this feature implemented as soon as possible, thanks. |
Hey, thanks a lot for sponsoring the project. I'm definitely in favor of eventually implementing this, but I'm not sure it will happen very soon and I cannot promise you that this will ever happen. There is simply a lot of prior work that's missing and the parser is also not helping a lot. As I said, I estimate this at like 2 days of full time work for me, which is a lot :/ So I hope I eventually get around to implement this, but I cannot promise. |
If you have full control over the code base, you could use dataclasses instead of |
No worries, I will have time to work on this myself eventually but I did struggle with figuring out how I would go about inferring the argument types. I found it easy to find the current argument but was lost with what to do after that so any extra guidance would be greatly appreciated, thanks.
I do have full control over the code base however as it is a public facing api I wanted to avoid requiring a massive amount of imports as the arguments can be nested deeply. There are other ways I can implement the api but in my opinion none are as clean or easy to use as plain dictionaries would be with autocomplete support. |
Inferring the argument types is probably not that hard (not 100% sure though). I initially thought that it would be hard, but it's probably not. You can probably just use |
For example
foo({'
->['title', 'published', 'metadata']
foo({'t
->['title']
foo({'metadata': {'
->['created_at']
I did see the comment on #1700
I would be happy to put some work into that, however I am not very familiar with the jedi internals, so if you have any pointers it would be much appreciated, thanks
The text was updated successfully, but these errors were encountered: