switch to upstream Jedi API
This replaces deprecated API calls to the new ones. Also this partially fixes #320.
This commit is contained in:
parent
d4ca726fac
commit
9f1f329823
@ -123,9 +123,9 @@ class JediCompleter( ThreadedCompleter ):
|
|||||||
script = self._GetJediScript()
|
script = self._GetJediScript()
|
||||||
try:
|
try:
|
||||||
if declaration:
|
if declaration:
|
||||||
definitions = script.get_definition()
|
definitions = script.goto_definitions()
|
||||||
else:
|
else:
|
||||||
definitions = script.goto()
|
definitions = script.goto_assignments()
|
||||||
except jedi.NotFoundError:
|
except jedi.NotFoundError:
|
||||||
vimsupport.PostVimMessage(
|
vimsupport.PostVimMessage(
|
||||||
"Cannot follow nothing. Put your cursor on a valid name." )
|
"Cannot follow nothing. Put your cursor on a valid name." )
|
||||||
@ -140,7 +140,7 @@ class JediCompleter( ThreadedCompleter ):
|
|||||||
if len( definition_list ) == 1:
|
if len( definition_list ) == 1:
|
||||||
definition = definition_list[ 0 ]
|
definition = definition_list[ 0 ]
|
||||||
if definition.in_builtin_module():
|
if definition.in_builtin_module():
|
||||||
if isinstance( definition.definition, jedi.keywords.Keyword ):
|
if isinstance( definition.name, jedi.keywords.Keyword ):
|
||||||
vimsupport.PostVimMessage(
|
vimsupport.PostVimMessage(
|
||||||
"Cannot get the definition of Python keywords." )
|
"Cannot get the definition of Python keywords." )
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user