From 870f5da3545ea1794a0fcd1d883550a33fa093b1 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 28 Dec 2013 21:21:15 +0100 Subject: [PATCH] use execute method instead of Execution creators --- jedi/evaluate/__init__.py | 2 +- jedi/evaluate/representation.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jedi/evaluate/__init__.py b/jedi/evaluate/__init__.py index 675fc582..7c1c6aa2 100644 --- a/jedi/evaluate/__init__.py +++ b/jedi/evaluate/__init__.py @@ -535,7 +535,7 @@ class Evaluator(object): call_path = call.generate_call_path() next(call_path, None) # the first one has been used already result += self.follow_path(call_path, r, call.parent, - position=call.start_pos) + position=call.start_pos) elif isinstance(call, pr.ListComprehension): loop = evaluate_list_comprehension(call) # Caveat: parents are being changed, but this doesn't matter, diff --git a/jedi/evaluate/representation.py b/jedi/evaluate/representation.py index da1bd999..2a7e0e68 100644 --- a/jedi/evaluate/representation.py +++ b/jedi/evaluate/representation.py @@ -135,7 +135,7 @@ class Instance(use_metaclass(CachedMetaClass, Executable)): def execute_subscope_by_name(self, name, args=()): method = self.get_subscope_by_name(name) - return Execution(self._evaluator, method, args).get_return_types() + return self._evaluator.execute(method, args) def get_descriptor_return(self, obj): """ Throws a KeyError if there's no method. """ @@ -358,7 +358,7 @@ class Function(use_metaclass(CachedMetaClass, pr.IsScope)): old_func = InstanceElement(self._evaluator, instance, old_func) instance = None - wrappers = Execution(self._evaluator, decorator, (old_func,)).get_return_types() + wrappers = self._evaluator.execute(decorator, (old_func,)) if not len(wrappers): debug.warning('no wrappers found', self.base_func) return None @@ -809,7 +809,7 @@ class Generator(use_metaclass(CachedMetaClass, pr.Base, Iterable)): def iter_content(self): """ returns the content of __iter__ """ - return Execution(self._evaluator, self.func, self.var_args).get_return_types(True) + return self._evaluator.execute(self.func, self.var_args, True) def get_index_types(self, index=None): debug.warning('Tried to get array access on a generator', self)