🐛 Fix type declaration of HTTPException (#279)

This commit is contained in:
Sebastián Ramírez 2019-05-30 19:43:02 +04:00 committed by GitHub
parent 9da626eb2c
commit 3ed112e8a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View 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