From: Sebastián Ramírez Date: Sat, 10 Jun 2023 17:23:12 +0000 (+0200) Subject: 🐛 Fix `HTTPException` header type annotations (#9648) X-Git-Tag: 0.96.1~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6dd8e567cc2de5993bdb69f57d1cbc2554e6b09e;p=thirdparty%2Ffastapi%2Ffastapi.git 🐛 Fix `HTTPException` header type annotations (#9648) --- diff --git a/fastapi/exceptions.py b/fastapi/exceptions.py index ca097b1cef..cac5330a22 100644 --- a/fastapi/exceptions.py +++ b/fastapi/exceptions.py @@ -11,7 +11,7 @@ class HTTPException(StarletteHTTPException): self, status_code: int, detail: Any = None, - headers: Optional[Dict[str, Any]] = None, + headers: Optional[Dict[str, str]] = None, ) -> None: super().__init__(status_code=status_code, detail=detail, headers=headers)