diff --git a/fastapi/_compat.py b/fastapi/_compat.py index c260f33a6..d3be652c7 100644 --- a/fastapi/_compat.py +++ b/fastapi/_compat.py @@ -144,7 +144,7 @@ if PYDANTIC_V2: exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, - context: Optional[Dict[str, Any]]= None, + context: Optional[Dict[str, Any]] = None, ) -> Any: # What calls this code passes a value that already called # self._type_adapter.validate_python(value) diff --git a/fastapi/routing.py b/fastapi/routing.py index ad15b3b8e..07c9c971c 100644 --- a/fastapi/routing.py +++ b/fastapi/routing.py @@ -130,7 +130,7 @@ async def serialize_response( exclude_defaults: bool = False, exclude_none: bool = False, is_coroutine: bool = True, - context: Optional[Dict[str, Any]]= None, + context: Optional[Dict[str, Any]] = None, ) -> Any: if field: errors = []