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

Function _make_eager_annotate

Lib/typing.py:2990–3001  ·  view source on GitHub ↗
(types)

Source from the content-addressed store, hash-verified

2988
2989
2990def _make_eager_annotate(types):
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
3004# attributes prohibited to set in NamedTuple class syntax

Callers 2

__new__Method · 0.85
NamedTupleFunction · 0.85

Calls 2

_type_checkFunction · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…