-
-
Notifications
You must be signed in to change notification settings - Fork 498
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
"from module import t" completion: include __all__
#1712
Comments
__all__
__all__
Can you give me examples of concrete open source code bases where this is the case?
:) |
My use case is a private repository involving lazy-loading modules which are costly to load. I use this auto-complete a lot, so it's very beneficial for me. Searching on larger repositories on Github, I did not find that many matches. It doesn't seem to be a common use case at this time. I noticed three patterns in general:
Here's a list:
|
I see. Thanks for the examples! IMO it would be fine to add it. However: I won't do it. I have other priorities. So if nobody steps up I will close this feature request again. It's probably also not easy to do. :) |
I appreciate the fast response and I understand; I also value prioritization Maybe you have some pointers on custom modification for my IDE? I don't know Jedi that well yet. I've found out that In the Anaconda code for example it seems to call |
What is that? |
@davidhalter It's here. This is not using static analysis. (BTW happy holidays 🎄, I'm heading to 🇨🇭 soon—home of the Jedi.) |
Well, the truth is that they mostly use Jedi for that. This is just a fallback for people that don't want to use Jedi. You could obviously do something like that, but it's not going to be easy to cover all the edge cases.
You could probably use Jedi on the last module between |
Ah, interesting! Maybe I was looking at the wrong code. Fact is that if I type in |
This is probably because one is purely static analysis and the other one has access to |
Feature request:
Upon completing
from module import t
, add values inmodule.__all__
to names.Background:
With the introduction of module
__getattr__
and__dir__
in PEP562, I've found situations while coding where the autocompletion names can only be inferred from__all__
or__dir__
.Existing implementations in other contexts:
Past discussions:
Looking through the Jedi source code, I see no immediate simple way of solving this. If there's a way to write a custom extension or plugin for Jedi for my IDE that works for me too.
Viile dank für Jedi, Dave. 🙏
The text was updated successfully, but these errors were encountered: