1
0
forked from VimPlug/jedi

Fix generators.

This commit is contained in:
Dave Halter
2014-11-14 02:05:25 +01:00
parent 13a128b160
commit 278bc9d705
4 changed files with 19 additions and 6 deletions

View File

@@ -84,7 +84,8 @@ class Generator(use_metaclass(CachedMetaClass, IterableWrapper, GeneratorMixin))
# Directly execute it, because with a normal call to py__call__ a
# Generator will be returned.
from jedi.evaluate.representation import FunctionExecution
return FunctionExecution(self._evaluator, self.func, self.var_args).get_return_types()
f = FunctionExecution(self._evaluator, self.func, self.var_args)
return f.get_return_types(check_yields=True)
def __getattr__(self, name):
if name not in ['start_pos', 'end_pos', 'parent', 'get_imports',