Refactoring out some pointless sys.path changes

This commit is contained in:
Strahinja Val Markovic 2013-05-19 10:34:44 -07:00
parent 468e245bcb
commit 4978546e62
4 changed files with 4 additions and 9 deletions

View File

@ -18,7 +18,7 @@
# along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
import ycm_core
from clang_completer import ClangCompleter
from completers.cpp.clang_completer import ClangCompleter
def GetCompleter():
if ycm_core.HasClangSupport():

View File

@ -20,10 +20,10 @@
from completers.completer import Completer
from completers.all.identifier_completer import IdentifierCompleter
from filename_completer import FilenameCompleter
from completers.general.filename_completer import FilenameCompleter
try:
from ultisnips_completer import UltiSnipsCompleter
from completers.general.ultisnips_completer import UltiSnipsCompleter
USE_ULTISNIPS_COMPLETER = True
except ImportError:
USE_ULTISNIPS_COMPLETER = False

View File

@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
from jedi_completer import JediCompleter
from completers.python.jedi_completer import JediCompleter
def GetCompleter():
return JediCompleter()

View File

@ -19,7 +19,6 @@
import imp
import os
import sys
import vimsupport
import vim
import ycm_utils as utils
@ -85,11 +84,7 @@ class YouCompleteMe( object ):
completer = None
supported_filetypes = [ filetype ]
if os.path.exists( module_path ):
sys.path.insert( 0, os.path.dirname( module_path ) )
module = imp.load_source( filetype, module_path )
del sys.path[ 0 ]
completer = module.GetCompleter()
if completer:
supported_filetypes.extend( completer.SupportedFiletypes() )