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

Function annotate

Lib/typing.py:2993–3000  ·  view source on GitHub ↗
(format)

Source from the content-addressed store, hash-verified

2991 checked_types = {key: _type_check(val, f"field {key} annotation must be a type")
2992 for key, val in types.items()}
2993 def annotate(format):
2994 match format:
2995 case _lazy_annotationlib.Format.VALUE | _lazy_annotationlib.Format.FORWARDREF:
2996 return checked_types
2997 case _lazy_annotationlib.Format.STRING:
2998 return _lazy_annotationlib.annotations_to_string(types)
2999 case _:
3000 raise NotImplementedError(format)
3001 return annotate
3002
3003

Callers 2

call_annotate_functionFunction · 0.85

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…