(class_dict: dict[str, Any])
| 98 | |
| 99 | |
| 100 | def get_annotations(class_dict: dict[str, Any]) -> dict[str, Any]: |
| 101 | raw_annotations: dict[str, Any] = class_dict.get("__annotations__", {}) |
| 102 | if sys.version_info >= (3, 14) and "__annotations__" not in class_dict: |
| 103 | # See https://github.com/pydantic/pydantic/pull/11991 |
| 104 | from annotationlib import ( |
| 105 | Format, |
| 106 | call_annotate_function, |
| 107 | get_annotate_from_class_namespace, |
| 108 | ) |
| 109 | |
| 110 | if annotate := get_annotate_from_class_namespace(class_dict): |
| 111 | raw_annotations = call_annotate_function(annotate, format=Format.FORWARDREF) |
| 112 | return raw_annotations |
| 113 | |
| 114 | |
| 115 | def is_table_model_class(cls: type[Any]) -> bool: |
no outgoing calls
no test coverage detected
searching dependent graphs…