-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
Jedi doesn't complete inside modules with a name equal to their containing package. #773
Comments
Similar experience here too:
When in b/b.py, trying to import a/a.py via this What is really odd about the first scenario of |
This is kind of a known issue. It's hard for Jedi to know where to start searching for those name. I guess we could search both directories for results (or clearly start defining a project path). It's possible to do this correctly by using something like |
|
Ok. I understand and think you're probably right. |
Would be great if we will be able to define project path for jedi as because of above import issues Visual Studio Code and Atom "Go to definition" doesn't work well in mentioned cases. Any chance for implementing project path parameter for jedi? |
You cannot specify a project path, but you can specify the |
Hmm could you please help me to configure it? This is my problem:
So whenever in I made some changes in Jedi code (diff):
After that I checked
Based on above Could you please tell me which path should I add to |
Can you please just send me a simple |
Above message is not that long if you will skip logs from Jedi. I can reproduce issue in Visual Studio Code but I don't know how it calls jedi that is why I started to log variables inside jedi script. Could you please try to understand what is going on based on my previous message? Otherwise I will have to go deeper into understanding how Visual Studio Code + Jedi work. Briefly issue is about not being able to go to the definition of module based on project path - it goes to the current open module instead if both module names are the same. |
Please dig deeper, I don't have the time to look into the issues too much. There's 90 other open issues. |
For the original issue: Please recheck. I think I've fixed it. The priorities of paths are now a bit more clear and I don't think it's still an issue. At least I've been working on very similar cases. Reopening if it's still an issue. |
@davidhalter , I've re-executed the initial test script and I'm getting the following for jedi-0.11.1:
Notice how it works as expected, with the exception of However, re-executing in jedi-0.12.0 (latest commit from master) results in the following:
So, it appears some wonky stuff is still happening. |
Thanks for checking it again. I think it is already a lot better even if your test doesn't reflect it. However there are still two issues:
|
I now changed some things about detecting |
Confirmed, it works as expected. @davidhalter thanks. |
Say we have a project with the following structure:
If we try to get completions from inside file b/b.py, jedi fails to do so.
For example, in the following test script we see in which situations we can get completions.
Which outputs:
As we can see, we can't get completions in module 'b/b.py' for other modules in package 'b'.
Additionaly, modules from package 'b' such as 'b/c.py' cant get completions for 'b/b.py'.
Python 3.5.2
Linux 4.7.2-1-ARCH GNU/Linux
jedi 0.9.0 (from emacs anaconda-mode v0.1.5)
The text was updated successfully, but these errors were encountered: