Browse Source

🎨 Auto format

pull/15654/head
pre-commit-ci-lite[bot] 5 days ago
committed by GitHub
parent
commit
46f10db436
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      fastapi/encoders.py

1
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)

Loading…
Cancel
Save