Clarify why unresolved hints fall back to the raw annotation

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BAKNJthovhc5VSi4MTiZUe
This commit is contained in:
Sai Mouli 2026-08-07 00:08:42 +05:30
commit f790c31c82

View file

@ -580,8 +580,9 @@ class FunctionResourceTemplate(ResourceTemplate):
try:
hints = _resolve_param_hints(fn)
except NameError:
# An annotation naming something we can't import here is not
# worth failing registration over; fall back to the raw form.
# Pydantic resolves annotations against namespaces this doesn't
# see, so a name we can't resolve may still be valid. Fall back
# to the raw form rather than failing a working registration.
hints = {}
exploded = {