Skip to content

Commit

Permalink
Restructure _GoTo* functions
Browse files Browse the repository at this point in the history
  • Loading branch information
vheon committed Jan 4, 2016
1 parent bd26dd7 commit 7b6abd2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions ycmd/completers/python/jedi_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,18 +248,16 @@ def GetSubcommandsMap( self ):

def _GoToDefinition( self, request_data ):
definitions = self._GetDefinitionsList( '/gotodefinition', request_data )
if definitions:
return self._BuildGoToResponse( definitions )
else:
if not definitions:
raise RuntimeError( 'Can\'t jump to definition.' )
return self._BuildGoToResponse( definitions )


def _GoToDeclaration( self, request_data ):
definitions = self._GetDefinitionsList( '/gotoassignment', request_data )
if definitions:
return self._BuildGoToResponse( definitions )
else:
if not definitions:
raise RuntimeError( 'Can\'t jump to declaration.' )
return self._BuildGoToResponse( definitions )


def _GoTo( self, request_data ):
Expand Down

0 comments on commit 7b6abd2

Please sign in to comment.