fix jedi DeprecationWarning

This commit is contained in:
simon_hsiung 2013-07-05 08:52:53 +00:00
parent cbc6c07a1a
commit a95195c8e8

View File

@ -67,10 +67,10 @@ class JediCompleter( ThreadedCompleter ):
def ComputeCandidates( self, unused_query, unused_start_column ): def ComputeCandidates( self, unused_query, unused_start_column ):
script = self._GetJediScript() script = self._GetJediScript()
return [ { 'word': str( completion.word ), return [ { 'word': str( completion.name ),
'menu': str( completion.description ), 'menu': str( completion.description ),
'info': str( completion.doc ) } 'info': str( completion.doc ) }
for completion in script.complete() ] for completion in script.completions() ]
def DefinedSubcommands( self ): def DefinedSubcommands( self ):
@ -147,7 +147,7 @@ class JediCompleter( ThreadedCompleter ):
vimsupport.PostVimMessage( "Builtin modules cannot be displayed." ) vimsupport.PostVimMessage( "Builtin modules cannot be displayed." )
else: else:
vimsupport.JumpToLocation( definition.module_path, vimsupport.JumpToLocation( definition.module_path,
definition.line_nr, definition.line,
definition.column + 1 ) definition.column + 1 )
else: else:
# multiple definitions # multiple definitions
@ -158,7 +158,7 @@ class JediCompleter( ThreadedCompleter ):
definition.description.encode( 'utf-8' ) } ) definition.description.encode( 'utf-8' ) } )
else: else:
defs.append( {'filename': definition.module_path.encode( 'utf-8' ), defs.append( {'filename': definition.module_path.encode( 'utf-8' ),
'lnum': definition.line_nr, 'lnum': definition.line,
'col': definition.column + 1, 'col': definition.column + 1,
'text': definition.description.encode( 'utf-8' ) } ) 'text': definition.description.encode( 'utf-8' ) } )