From 46f10db4360d1bf2d27ca9af6d531bb1e2b2cef6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Sun, 31 May 2026 07:59:56 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/encoders.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fastapi/encoders.py b/fastapi/encoders.py index fef374643d..d688a58afc 100644 --- a/fastapi/encoders.py +++ b/fastapi/encoders.py @@ -241,6 +241,7 @@ def jsonable_encoder( if exclude is not None and not isinstance(exclude, (set, dict)): exclude = set(exclude) # type: ignore[assignment] # ty: ignore[invalid-assignment] if isinstance(obj, BaseModel): + def custom_encoder_fallback(value: Any) -> Any: if type(value) in custom_encoder: encoded_value = custom_encoder[type(value)](value)