(types)
| 2939 | |
| 2940 | |
| 2941 | def _make_eager_annotate(types): |
| 2942 | checked_types = {key: _type_check(val, f"field {key} annotation must be a type") |
| 2943 | for key, val in types.items()} |
| 2944 | def annotate(format): |
| 2945 | match format: |
| 2946 | case _lazy_annotationlib.Format.VALUE | _lazy_annotationlib.Format.FORWARDREF: |
| 2947 | return checked_types |
| 2948 | case _lazy_annotationlib.Format.STRING: |
| 2949 | return _lazy_annotationlib.annotations_to_string(types) |
| 2950 | case _: |
| 2951 | raise NotImplementedError(format) |
| 2952 | return annotate |
| 2953 | |
| 2954 | |
| 2955 | # attributes prohibited to set in NamedTuple class syntax |
no test coverage detected