From dbd8bf005403652106477ff677170167635a9420 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 18 Oct 2025 04:34:41 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20[pre-commit.ci]=20Auto=20format?= =?UTF-8?q?=20from=20pre-commit.com=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/_compat/v2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastapi/_compat/v2.py b/fastapi/_compat/v2.py index e7abe9d54..ff1134029 100644 --- a/fastapi/_compat/v2.py +++ b/fastapi/_compat/v2.py @@ -112,7 +112,7 @@ class ModelField: # Fallback for v1.FieldInfo (no .annotation) # Use a simple type that TypeAdapter can handle annotated_type = Annotated[str, self.field_info] - + try: self._type_adapter: TypeAdapter[Any] = TypeAdapter(annotated_type) except (AttributeError, TypeError, Exception):