forked from VimPlug/jedi
er.wrap -> Evaluator.wrap
This commit is contained in:
@@ -113,7 +113,7 @@ class Script(object):
|
||||
debug.speed('init')
|
||||
|
||||
def _parsed_callback(self, parser):
|
||||
module = er.wrap(self._evaluator, parser.module)
|
||||
module = self._evaluator.wrap(parser.module)
|
||||
self._evaluator.modules[unicode(module.name)] = module
|
||||
|
||||
@property
|
||||
@@ -213,7 +213,7 @@ class Script(object):
|
||||
if isinstance(c.parent, (pr.Function, pr.Class)):
|
||||
# TODO I think this is a hack. It should be an
|
||||
# er.Function/er.Class before that.
|
||||
c = er.wrap(self._evaluator, c.parent).name
|
||||
c = self._evaluator.wrap(c.parent).name
|
||||
new = classes.Completion(self._evaluator, c, needs_dot, len(like))
|
||||
k = (new.name, new.complete) # key
|
||||
if k in comp_dct and settings.no_completion_duplicates:
|
||||
@@ -235,7 +235,7 @@ class Script(object):
|
||||
scope = scope.get_parent_scope()
|
||||
names_dicts = global_names_dict_generator(
|
||||
self._evaluator,
|
||||
er.wrap(self._evaluator, scope),
|
||||
self._evaluator.wrap(scope),
|
||||
self._pos
|
||||
)
|
||||
completion_names = []
|
||||
@@ -342,7 +342,7 @@ class Script(object):
|
||||
context = self._user_context.get_context()
|
||||
definitions = set()
|
||||
if next(context) in ('class', 'def'):
|
||||
definitions = set([er.wrap(self._evaluator, self._parser.user_scope())])
|
||||
definitions = set([self._evaluator.wrap(self._parser.user_scope())])
|
||||
else:
|
||||
# Fetch definition of callee, if there's no path otherwise.
|
||||
if not goto_path:
|
||||
|
||||
@@ -61,7 +61,7 @@ class BaseDefinition(object):
|
||||
"""
|
||||
An instance of :class:`jedi.parser.reprsentation.Name` subclass.
|
||||
"""
|
||||
self._definition = er.wrap(evaluator, self._name.get_definition())
|
||||
self._definition = evaluator.wrap(self._name.get_definition())
|
||||
self.is_keyword = isinstance(self._definition, keywords.Keyword)
|
||||
|
||||
# generate a path to the definition
|
||||
@@ -175,7 +175,6 @@ class BaseDefinition(object):
|
||||
pass
|
||||
else:
|
||||
if isinstance(par, er.ModuleWrapper):
|
||||
#module = er.wrap(self._evaluator, par)
|
||||
# TODO just make the path dotted from the beginning, we
|
||||
# shouldn't really split here.
|
||||
path[0:0] = par.py__name__().split('.')
|
||||
@@ -354,7 +353,7 @@ class BaseDefinition(object):
|
||||
|
||||
def parent(self):
|
||||
scope = self._definition.get_parent_scope()
|
||||
scope = er.wrap(self._evaluator, scope)
|
||||
scope = self._evaluator.wrap(scope)
|
||||
return Definition(self._evaluator, scope.name)
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
@@ -85,7 +85,7 @@ class LazyName(helpers.FakeName):
|
||||
assert len(parser_path) == 1
|
||||
found = self._evaluator.find_types(mod, parser_path[0], search_global=True)
|
||||
else:
|
||||
found = [er.wrap(self._evaluator, mod)]
|
||||
found = [self._evaluator.wrap(mod)]
|
||||
|
||||
if not found:
|
||||
debug.warning('Possibly an interpreter lookup for Python code failed %s',
|
||||
|
||||
Reference in New Issue
Block a user