Browse Source

🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

pull/14201/head
pre-commit-ci[bot] 9 months ago
parent
commit
dbd8bf0054
  1. 2
      fastapi/_compat/v2.py

2
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):

Loading…
Cancel
Save