From 9f1f32982358125405017eaa041628fd43b16c4b Mon Sep 17 00:00:00 2001 From: Stanislav Golovanov Date: Sat, 18 May 2013 09:40:08 +0400 Subject: [PATCH] switch to upstream Jedi API This replaces deprecated API calls to the new ones. Also this partially fixes #320. --- python/completers/python/jedi_completer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/completers/python/jedi_completer.py b/python/completers/python/jedi_completer.py index 50444f4c..865b1dd0 100644 --- a/python/completers/python/jedi_completer.py +++ b/python/completers/python/jedi_completer.py @@ -123,9 +123,9 @@ class JediCompleter( ThreadedCompleter ): script = self._GetJediScript() try: if declaration: - definitions = script.get_definition() + definitions = script.goto_definitions() else: - definitions = script.goto() + definitions = script.goto_assignments() except jedi.NotFoundError: vimsupport.PostVimMessage( "Cannot follow nothing. Put your cursor on a valid name." ) @@ -140,7 +140,7 @@ class JediCompleter( ThreadedCompleter ): if len( definition_list ) == 1: definition = definition_list[ 0 ] if definition.in_builtin_module(): - if isinstance( definition.definition, jedi.keywords.Keyword ): + if isinstance( definition.name, jedi.keywords.Keyword ): vimsupport.PostVimMessage( "Cannot get the definition of Python keywords." ) else: