From 8d7a1cacfb3e1a30cbb5d8e207aa1917bad9a3e2 Mon Sep 17 00:00:00 2001 From: Stefan Mejlgaard Date: Fri, 16 Jun 2023 15:04:17 +0200 Subject: [PATCH] Change JSONResponse headers type annotation to match other Response classes (#2187) --- starlette/responses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starlette/responses.py b/starlette/responses.py index 453bbb158..24fece1d4 100644 --- a/starlette/responses.py +++ b/starlette/responses.py @@ -189,7 +189,7 @@ def __init__( self, content: typing.Any, status_code: int = 200, - headers: typing.Optional[typing.Dict[str, str]] = None, + headers: typing.Optional[typing.Mapping[str, str]] = None, media_type: typing.Optional[str] = None, background: typing.Optional[BackgroundTask] = None, ) -> None: