Search code examples
pythonemacsautocompletejediemacs-jedi

jedi fails to correctly autocomplete from package with the same name as the module that I'm in


I'm using emacs and I have configured jedi.el so it autocompletes after dot. Let's assume that I'm writing a module my_app.my_module and I have package installed in env called my_module. My file my_app/my_module.py will look like:

import my_module

class SomeClass:
    pass
(...)
my_module.<here_i_expect_autocompletion_from_my_module_package>

Now the thing is that jedi.el tries to autocomplete from my_app.my_module(giving me SomeClassetc.) not from my_module package installed in env. What should I do to get expected autocompletion?

Edit: Looks like this is an jedi issue not jedi.el, because i can reproduce issue using only jedi.


Solution

  • It turned out that this is a problem of jedi, not of jedi.el. Furthermore it seems that this behavior is specific for projects based on pyramid framework.