anaconda icon indicating copy to clipboard operation
anaconda copied to clipboard

For some reason Go to jumps to import statement firstly

Open kiddten opened this issue 7 years ago • 9 comments

I've noticed strange behavior recently. When I am trying to use go to definition anaconda jumps to import statement with that expression, and only after that by pressing go to second time I am able to jump to expression definition in that file. I mean that there is intermediate place in import statement between direct jump. Any ideas?

kiddten avatar Nov 20 '17 12:11 kiddten

Maybe there is some change in how Jedi resolves the symbols, this happens always or just with some kind of symbol? (like defined by you, part of standard library, 3rd party libraries, etc)

DamnWidget avatar Nov 20 '17 12:11 DamnWidget

Most of the time. Looks like it is ok only with default go to fallbacks.

kiddten avatar Nov 20 '17 12:11 kiddten

Hm there is some pattern. If there is direct import statement with some expression from .selectable import TableClause go to called on TableClause jumps to import statement and only after that in file which contains TableClause definition.

kiddten avatar Nov 20 '17 12:11 kiddten

I confirm. Very annoying behaviour.

pokidovea avatar Nov 27 '17 07:11 pokidovea

After look into this for a while, looks like Jedi is resolving to those locations itself

DamnWidget avatar Nov 28 '17 17:11 DamnWidget

Yeah https://github.com/davidhalter/jedi/issues/995

kiddten avatar Nov 30 '17 11:11 kiddten

Should be fixed on v2.1.27

DamnWidget avatar Jul 04 '18 21:07 DamnWidget

Reproduced on version 2.1.28

pokidovea avatar Jul 11 '18 06:07 pokidovea

I had to rollback so 2.1.28 is equivalent to 2.1.26

DamnWidget avatar Jul 12 '18 11:07 DamnWidget