Question: Consider the following very simple Python project tree:

```
.
├── main.py
└── second.py

```

main.py:

```
import second as s

def foo(arg):
    arg.helloWorld()

foo(s)

```

second.py:

```
def helloWorld():
    print("Hello World!")

```

My Jedi setup in ~/.emacs.d/init.el is the same as [this file](https://github.com/wernerandrew/jedi-starter/blob/master/jedi-starter.el), but you can also see my exact setup [here](https://github.com/dmalyuta/dotfiles/blob/master/.emacs.d/init.el#L555).

This project runs fine (`python main.py` outputs `Hello World!`) but running `jedi:goto-definition` on the `helloWorld` in `arg.helloWorld()` gives `Definition not found.`. However, if I were to change `main.py` directly to:

```
import second as s

s.helloWorld()

```

Now `jedi:goto-definition` works and jumps to the `def helloWorld()` in `second.py`! So it looks to be a problem with Jedi not recognizing `arg` as coming from `s`? I am new to Python and maybe there is an intricacy that I am missing... but the bottom line is that I want Jedi to jump to the definition of `helloWorld`. How do I achieve this? Thanks for helping!

Answer: 
Works as expected for me:

```
$ pip show jedi
---
Name: jedi
Version: 0.10.0
Location: /usr/local/lib/python2.7/dist-packages
Requires:

```

Ensure the latest version of Jedi:

```
pip install --upgrade jedi

```
`foo` can be called with any `arg`, (`arg` should have a `helloWorld` method if you don't want to raise an exception, but it doesn't have to...), so it is impossible to know what `arg` could be in the function.

If you have for example:

```
import second as s

class Hello:
    def helloWorld(self):
        print('I can say hello too!')

def foo(arg):
    arg.helloWorld() # Where could helloWorld come from?

foo(s)         # from s?
foo(Hello())   # from Hello?
foo(2)         # doesn't even exist

```

So, `jedi` can't know...