1
0
forked from VimPlug/jedi

Refactor the docstring input.

This commit is contained in:
Dave Halter
2017-04-20 18:06:40 +02:00
parent fbde21166b
commit ea1905f121
3 changed files with 9 additions and 8 deletions

View File

@@ -99,9 +99,10 @@ def py__annotations__(funcdef):
@memoize_default()
def infer_return_types(context, func):
annotation = py__annotations__(func).get("return", None)
return _evaluate_for_annotation(context, annotation)
def infer_return_types(function_context):
annotation = py__annotations__(function_context.tree_node).get("return", None)
module_context = function_context.get_root_context()
return _evaluate_for_annotation(module_context, annotation)
_typing_module = None