MCPcopy Index your code
hub / github.com/python/cpython / _make_forward_ref

Function _make_forward_ref

Lib/typing.py:1000–1009  ·  view source on GitHub ↗
(code, *, parent_fwdref=None, **kwargs)

Source from the content-addressed store, hash-verified

998
999
1000def _make_forward_ref(code, *, parent_fwdref=None, **kwargs):
1001 if parent_fwdref is not None:
1002 if parent_fwdref.__forward_module__ is not None:
1003 kwargs['module'] = parent_fwdref.__forward_module__
1004 if parent_fwdref.__owner__ is not None:
1005 kwargs['owner'] = parent_fwdref.__owner__
1006 forward_ref = _lazy_annotationlib.ForwardRef(code, **kwargs)
1007 # For compatibility, eagerly compile the forwardref's code.
1008 forward_ref.__forward_code__
1009 return forward_ref
1010
1011
1012def evaluate_forward_ref(

Callers 4

_type_convertFunction · 0.85
_eval_typeFunction · 0.85
evaluate_forward_refFunction · 0.85
get_type_hintsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…