MCPcopy
hub / github.com/msgspec/msgspec / _get_class_annotations

Method _get_class_annotations

src/msgspec/inspect.py:731–737  ·  view source on GitHub ↗

A cached version of `get_class_annotations`

(self, t)

Source from the content-addressed store, hash-verified

729 self.cache = {}
730
731 def _get_class_annotations(self, t):
732 """A cached version of `get_class_annotations`"""
733 try:
734 return self.type_hints[t]
735 except KeyError:
736 out = self.type_hints[t] = _get_class_annotations(t)
737 return out
738
739 def run(self):
740 # First construct a decoder to validate the types are valid

Callers 1

_translate_innerMethod · 0.95

Calls 1

_get_class_annotationsFunction · 0.85

Tested by

no test coverage detected