Fixing python 2.6 compatibility
string.format() requires the number inside '{}' for Python 2.6.
This commit is contained in:
parent
ddef46fdbe
commit
cb98dc8537
@ -33,7 +33,7 @@ NO_COMPILE_FLAGS_MESSAGE = 'Still no compile flags, no completions yet.'
|
|||||||
INVALID_FILE_MESSAGE = 'File is invalid.'
|
INVALID_FILE_MESSAGE = 'File is invalid.'
|
||||||
NO_COMPLETIONS_MESSAGE = 'No completions found; errors in the file?'
|
NO_COMPLETIONS_MESSAGE = 'No completions found; errors in the file?'
|
||||||
FILE_TOO_SHORT_MESSAGE = (
|
FILE_TOO_SHORT_MESSAGE = (
|
||||||
'File is less than {} lines long; not compiling.'.format(
|
'File is less than {0} lines long; not compiling.'.format(
|
||||||
MIN_LINES_IN_FILE_TO_PARSE ) )
|
MIN_LINES_IN_FILE_TO_PARSE ) )
|
||||||
NO_DIAGNOSTIC_MESSAGE = 'No diagnostic for current line!'
|
NO_DIAGNOSTIC_MESSAGE = 'No diagnostic for current line!'
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ class CsharpCompleter( Completer ):
|
|||||||
|
|
||||||
def DebugInfo( self ):
|
def DebugInfo( self ):
|
||||||
if self._ServerIsRunning():
|
if self._ServerIsRunning():
|
||||||
return 'Server running at: {}\nLogfiles:\n{}\n{}'.format(
|
return 'Server running at: {0}\nLogfiles:\n{1}\n{2}'.format(
|
||||||
self._PortToHost(), self._filename_stdout, self._filename_stderr )
|
self._PortToHost(), self._filename_stdout, self._filename_stderr )
|
||||||
else:
|
else:
|
||||||
return 'Server is not running'
|
return 'Server is not running'
|
||||||
@ -118,7 +118,7 @@ class CsharpCompleter( Completer ):
|
|||||||
solutionfile = solutionfiles[ 0 ]
|
solutionfile = solutionfiles[ 0 ]
|
||||||
else:
|
else:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
'Found multiple solution files instead of one!\n{}'.format(
|
'Found multiple solution files instead of one!\n{0}'.format(
|
||||||
solutionfiles ) )
|
solutionfiles ) )
|
||||||
|
|
||||||
omnisharp = os.path.join(
|
omnisharp = os.path.join(
|
||||||
|
@ -74,7 +74,7 @@ class ServerState( object ):
|
|||||||
if completer:
|
if completer:
|
||||||
return completer
|
return completer
|
||||||
|
|
||||||
raise ValueError( 'No semantic completer exists for filetypes: {}'.format(
|
raise ValueError( 'No semantic completer exists for filetypes: {0}'.format(
|
||||||
current_filetypes ) )
|
current_filetypes ) )
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ def LoadDictIntoVimGlobals( new_globals, overwrite = True ):
|
|||||||
|
|
||||||
# We need to use json.dumps because that won't use the 'u' prefix on strings
|
# We need to use json.dumps because that won't use the 'u' prefix on strings
|
||||||
# which Vim would bork on.
|
# which Vim would bork on.
|
||||||
vim.eval( 'extend( g:, {}, {})'.format( json.dumps( new_globals ),
|
vim.eval( 'extend( g:, {0}, {1})'.format( json.dumps( new_globals ),
|
||||||
extend_option ) )
|
extend_option ) )
|
||||||
|
|
||||||
|
|
||||||
|
@ -204,10 +204,10 @@ class YouCompleteMe( object ):
|
|||||||
def DebugInfo( self ):
|
def DebugInfo( self ):
|
||||||
debug_info = BaseRequest.PostDataToHandler( BuildRequestData(),
|
debug_info = BaseRequest.PostDataToHandler( BuildRequestData(),
|
||||||
'debug_info' )
|
'debug_info' )
|
||||||
debug_info += '\nServer running at: {}'.format(
|
debug_info += '\nServer running at: {0}'.format(
|
||||||
BaseRequest.server_location )
|
BaseRequest.server_location )
|
||||||
if self._server_stderr or self._server_stdout:
|
if self._server_stderr or self._server_stdout:
|
||||||
debug_info += '\nServer logfiles:\n {}\n {}'.format(
|
debug_info += '\nServer logfiles:\n {0}\n {1}'.format(
|
||||||
self._server_stdout,
|
self._server_stdout,
|
||||||
self._server_stderr )
|
self._server_stderr )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user