(fn: Any)
| 174 | |
| 175 | |
| 176 | def _resolve_annotations(fn: Any) -> Mapping[str, Any]: |
| 177 | fallback = getattr(fn, "__annotations__", {}) or {} |
| 178 | get_annotations = getattr(inspect, "get_annotations", None) |
| 179 | if get_annotations is None: |
| 180 | return fallback |
| 181 | try: |
| 182 | return inspect.get_annotations(fn, eval_str=True, include_extras=True) |
| 183 | except TypeError: |
| 184 | try: |
| 185 | return inspect.get_annotations(fn, eval_str=True) |
| 186 | except TypeError: |
| 187 | try: |
| 188 | return inspect.get_annotations(fn) |
| 189 | except Exception: |
| 190 | return fallback |
| 191 | except Exception: |
| 192 | return fallback |
| 193 | |
| 194 | |
| 195 | def _build_parameters_schema(signature: inspect.Signature, annotations: Mapping[str, Any]) -> Dict[str, Any]: |
no outgoing calls
no test coverage detected