From a95195c8e83a8ac8711da2a671e857687239430e Mon Sep 17 00:00:00 2001 From: simon_hsiung Date: Fri, 5 Jul 2013 08:52:53 +0000 Subject: [PATCH] fix jedi DeprecationWarning --- python/ycm/completers/python/jedi_completer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/ycm/completers/python/jedi_completer.py b/python/ycm/completers/python/jedi_completer.py index 1923e2a5..5d454a06 100644 --- a/python/ycm/completers/python/jedi_completer.py +++ b/python/ycm/completers/python/jedi_completer.py @@ -67,10 +67,10 @@ class JediCompleter( ThreadedCompleter ): def ComputeCandidates( self, unused_query, unused_start_column ): script = self._GetJediScript() - return [ { 'word': str( completion.word ), + return [ { 'word': str( completion.name ), 'menu': str( completion.description ), 'info': str( completion.doc ) } - for completion in script.complete() ] + for completion in script.completions() ] def DefinedSubcommands( self ): @@ -147,7 +147,7 @@ class JediCompleter( ThreadedCompleter ): vimsupport.PostVimMessage( "Builtin modules cannot be displayed." ) else: vimsupport.JumpToLocation( definition.module_path, - definition.line_nr, + definition.line, definition.column + 1 ) else: # multiple definitions @@ -158,7 +158,7 @@ class JediCompleter( ThreadedCompleter ): definition.description.encode( 'utf-8' ) } ) else: defs.append( {'filename': definition.module_path.encode( 'utf-8' ), - 'lnum': definition.line_nr, + 'lnum': definition.line, 'col': definition.column + 1, 'text': definition.description.encode( 'utf-8' ) } )