Skip to content

Commit

Permalink
ycm_core imported inside wrap function
Browse files Browse the repository at this point in the history
We want to prevent Vim from importing ycm_core.
  • Loading branch information
Valloric committed Feb 24, 2016
1 parent fd8d0d6 commit 7d6cb3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ycmd/completers/completer_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
from builtins import * # noqa
from future.utils import iteritems

# Must not import ycm_core here! Vim imports completer, which imports this file.
# We don't want ycm_core inside Vim.
import os
import re
from collections import defaultdict
from ycm_core import FilterAndSortCandidates
from ycmd.utils import ToCppStringCompatible


Expand Down Expand Up @@ -152,6 +153,7 @@ def FiletypeCompleterExistsForFiletype( filetype ):


def FilterAndSortCandidatesWrap( candidates, sort_property, query ):
from ycm_core import FilterAndSortCandidates
return FilterAndSortCandidates( candidates,
ToCppStringCompatible( sort_property ),
ToCppStringCompatible( query ) )
Expand Down

0 comments on commit 7d6cb3c

Please sign in to comment.