docstring annotation types should be instantiated -> execute them, fixes #178

This commit is contained in:
Dave Halter
2014-04-02 20:42:18 +02:00
parent e681ed9fda
commit bb72ecfa8a

View File

@@ -15,6 +15,7 @@ annotations.
"""
import re
from itertools import chain
from textwrap import dedent
from jedi.evaluate.cache import memoize_default
@@ -115,7 +116,8 @@ def _evaluate_for_statement_string(evaluator, string, module):
# call. In that case it's the module of the function call.
# stuffed with content from a function call.
pseudo_cls.parent = module
return evaluator.eval_statement(stmt)
return chain.from_iterable(evaluator.execute(defn)
for defn in evaluator.eval_statement(stmt))
@memoize_default(None, evaluator_is_first_arg=True)