From bfafad4f50c1f1f54b0a2a290b9c7778f9722e98 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Sat, 28 Jul 2012 12:24:25 -0700 Subject: [PATCH] Using python's abc module for the Completer class --- python/ycm.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/ycm.py b/python/ycm.py index db4a73b8..9842a797 100644 --- a/python/ycm.py +++ b/python/ycm.py @@ -19,6 +19,7 @@ import vim import indexer +import abc MIN_NUM_CHARS = int( vim.eval( "g:ycm_min_num_of_chars_for_completion" ) ) CLANG_COMPLETION_ENABLED = int( vim.eval( "g:ycm_clang_completion_enabled" ) ) @@ -27,10 +28,11 @@ MAX_IDENTIFIER_COMPLETIONS_RETURNED = 10 class Completer( object ): + __metaclass__ = abc.ABCMeta + def __init__( self ): self.future = None - def AsyncCandidateRequestReady( self ): if not self.future: # We return True so that the caller can extract the default value from the @@ -44,7 +46,7 @@ class Completer( object ): return [] return self.future.GetResults() - + @abc.abstractmethod def OnFileReadyToParse( self ): pass