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()