From: Sebastián Ramírez Date: Thu, 30 May 2019 15:43:02 +0000 (+0400) Subject: :bug: Fix type declaration of HTTPException (#279) X-Git-Tag: 0.27.1~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3ed112e8a93d1b6fdcdf3f9fe9e8df986114cc1c;p=thirdparty%2Ffastapi%2Ffastapi.git :bug: Fix type declaration of HTTPException (#279) --- diff --git a/fastapi/exceptions.py b/fastapi/exceptions.py index 97f955a731..cbd82b44af 100644 --- a/fastapi/exceptions.py +++ b/fastapi/exceptions.py @@ -1,10 +1,12 @@ +from typing import Any + from pydantic import ValidationError from starlette.exceptions import HTTPException as StarletteHTTPException class HTTPException(StarletteHTTPException): def __init__( - self, status_code: int, detail: str = None, headers: dict = None + self, status_code: int, detail: Any = None, headers: dict = None ) -> None: super().__init__(status_code=status_code, detail=detail) self.headers = headers