Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
aminalaee committed Dec 14, 2021
1 parent d58ac98 commit b6cf47e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions starlette/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(
self.debug = debug # TODO: We ought to handle 404 cases if debug is set.
self._status_handlers: typing.Dict[int, typing.Callable] = {}
self._exception_handlers: typing.Dict[
typing.Type[Exception], typing.Callable[[Request, Exception], Response]
typing.Type[Exception], typing.Callable
] = {HTTPException: self.http_exception}
if handlers is not None:
for key, value in handlers.items():
Expand All @@ -52,7 +52,7 @@ def add_exception_handler(

def _lookup_exception_handler(
self, exc: Exception
) -> typing.Optional[typing.Callable[[Request, Exception], Response]]:
) -> typing.Optional[typing.Callable]:
for cls in type(exc).__mro__:
if cls in self._exception_handlers:
return self._exception_handlers[cls]
Expand Down

0 comments on commit b6cf47e

Please sign in to comment.