Resolve postponed annotations before validation and schema creation

This commit is contained in:
Andras Schmelczer 2026-10-27 19:53:40 +00:00
commit 5e819525db

View file

@ -0,0 +1,7 @@
import inspect
from typing import Any, Callable, Dict, get_type_hints
def get_function_type_hints(func: Callable) -> Dict[str, Any]:
"""Resolve postponed annotations in the original function's namespace."""
return get_type_hints(inspect.unwrap(func), include_extras=True)