Преглед на файлове

Minor changes addressing review comments.

Davit Samvelyan преди 7 години
родител
ревизия
fc745f74b3
променени са 3 файла, в които са добавени 4 реда и са изтрити 8 реда
  1. 3 2
      python/ycm/buffer.py
  2. 0 5
      python/ycm/vimsupport.py
  3. 1 1
      python/ycm/youcompleteme.py

+ 3 - 2
python/ycm/buffer.py

@@ -104,5 +104,6 @@ class BufferDict( dict ):
 
 
   def __missing__( self, key ):
-    value = self[ key ] = Buffer( key, self._user_options )
-    return value
+    # Python does not allow to return assignment operation result directly
+    new_value = self[ key ] = Buffer( key, self._user_options )
+    return new_value

+ 0 - 5
python/ycm/vimsupport.py

@@ -592,11 +592,6 @@ def CurrentFiletypes():
   return VimExpressionToPythonType( "&filetype" ).split( '.' )
 
 
-def GetBufferFiletypes( bufnr ):
-  command = 'getbufvar({0}, "&ft")'.format( bufnr )
-  return VimExpressionToPythonType( command ).split( '.' )
-
-
 def FiletypesForBuffer( buffer_object ):
   # NOTE: Getting &ft for other buffers only works when the buffer has been
   # visited by the user at least once, which is true for modified buffers

+ 1 - 1
python/ycm/youcompleteme.py

@@ -580,7 +580,7 @@ class YouCompleteMe( object ):
       #
       # Note: it is the server's responsibility to determine the frequency of
       # error/warning/prompts when receiving a FileReadyToParse event, but
-      # it our responsibility to ensure that we only apply the
+      # it is our responsibility to ensure that we only apply the
       # warning/error/prompt received once (for each event).
       current_buffer.MarkResponseHandled()