mirror of https://github.com/tiangolo/fastapi.git
🎨 Tweak types for mypy (#14816)
This commit is contained in:
parent
5d50b74915
commit
440bfd70a9
|
|
@ -219,9 +219,9 @@ def jsonable_encoder(
|
|||
if isinstance(obj, encoder_type):
|
||||
return encoder_instance(obj)
|
||||
if include is not None and not isinstance(include, (set, dict)):
|
||||
include = set(include)
|
||||
include = set(include) # type: ignore[assignment]
|
||||
if exclude is not None and not isinstance(exclude, (set, dict)):
|
||||
exclude = set(exclude)
|
||||
exclude = set(exclude) # type: ignore[assignment]
|
||||
if isinstance(obj, BaseModel):
|
||||
obj_dict = obj.model_dump(
|
||||
mode="json",
|
||||
|
|
|
|||
Loading…
Reference in New Issue