@memoize_default(None, evaluator_is_first_arg=True)
def find_return_types(evaluator, func):
 def search_return_in_docstr(docstr):
  for p in DOCSTRING_RETURN_PATTERNS:
   match = p.search(docstr)
   if match:
    return [_strip_rst_role(match.group(1))]
  found = []
  if (not found):
   found = _search_return_in_numpydocstr(docstr)
  return found
 docstr = func.raw_doc
 module = func.get_parent_until()
 types = []
 for type_str in search_return_in_docstr(docstr):
  type_ = _evaluate_for_statement_string(evaluator, type_str, module)
  types.extend(type_)
 debug.dbg('DOC!!!!!!!!!!!!!! wow types?: %s in %s', types, func)
 return types

@ memoize_default ( None , evaluator_is_first_arg = True ) def find_return_types ( evaluator , func ) : def search_return_in_docstr ( docstr ) : for p in DOCSTRING_RETURN_PATTERNS : match = p . search ( docstr ) if match : return [ _strip_rst_role ( match . group ( 1 ) ) ] found = [ ] if ( not found ) : found = _search_return_in_numpydocstr ( docstr ) return found docstr = func . raw_doc module = func . get_parent_until ( ) types = [ ] for type_str in search_return_in_docstr ( docstr ) : type_ = _evaluate_for_statement_string ( evaluator , type_str , module ) types . extend ( type_ ) debug . dbg ( 'DOC!!!!!!!!!!!!!! wow types?: %s in %s' , types , func ) return types
determines a set of potential return types for func using docstring hints :type evaluator: jedi .