mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 14:54:47 +08:00
docstring annotation types should be instantiated -> execute them, fixes #178
This commit is contained in:
@@ -15,6 +15,7 @@ annotations.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
from itertools import chain
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
|
|
||||||
from jedi.evaluate.cache import memoize_default
|
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.
|
# call. In that case it's the module of the function call.
|
||||||
# stuffed with content from a function call.
|
# stuffed with content from a function call.
|
||||||
pseudo_cls.parent = module
|
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)
|
@memoize_default(None, evaluator_is_first_arg=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user