]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
:bug: Fix type declaration of HTTPException (#279)
authorSebastián Ramírez <tiangolo@gmail.com>
Thu, 30 May 2019 15:43:02 +0000 (19:43 +0400)
committerGitHub <noreply@github.com>
Thu, 30 May 2019 15:43:02 +0000 (19:43 +0400)
fastapi/exceptions.py

index 97f955a73156ed82cf9537d3f913e2ae4defe190..cbd82b44aff7a76387462ea47ceb3221b8880bac 100644 (file)
@@ -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