]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
Replace `dict` by `Mapping` on `HTTPException.headers` (#2749)
authorrijenkii <me@rijenkii.tk>
Mon, 18 Nov 2024 19:00:58 +0000 (02:00 +0700)
committerGitHub <noreply@github.com>
Mon, 18 Nov 2024 19:00:58 +0000 (20:00 +0100)
starlette/exceptions.py

index bd3352eb0f78717fdff0d4e02903e3a5b056a766..c48f0838a927ec68251f3e318f10969d85c22fe8 100644 (file)
@@ -12,7 +12,7 @@ class HTTPException(Exception):
         self,
         status_code: int,
         detail: str | None = None,
-        headers: dict[str, str] | None = None,
+        headers: typing.Mapping[str, str] | None = None,
     ) -> None:
         if detail is None:
             detail = http.HTTPStatus(status_code).phrase