From 65013d10194ddd9d66ef42bb46089173fec19701 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Tue, 24 Dec 2013 15:24:37 +0100 Subject: [PATCH] add an execute method to the evaluator --- jedi/evaluate/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jedi/evaluate/__init__.py b/jedi/evaluate/__init__.py index 0d7cf306..e8ac63c5 100644 --- a/jedi/evaluate/__init__.py +++ b/jedi/evaluate/__init__.py @@ -642,7 +642,7 @@ class Evaluator(object): elif current.type not in [pr.Array.DICT]: # Scope must be a class or func - make an instance or execution. debug.dbg('exe', scope) - result = er.Execution(scope, current).get_return_types() + result = self.execute(scope, current) else: # Curly braces are not allowed, because they make no sense. debug.warning('strange function call with {}', current, scope) @@ -658,6 +658,9 @@ class Evaluator(object): position=position)) return self.follow_paths(path, set(result), call_scope, position=position) + def execute(self, scope, params): + return er.Execution(scope, params).get_return_types() + def goto(self, stmt, call_path=None): if call_path is None: commands = stmt.get_commands()