Skip to content

Commit

Permalink
Remove handler return type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
Adham Salama committed Apr 19, 2023
1 parent f807bbe commit a8ce1f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions simpleapi/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ def handle_request(
return middleware_response

handler_type_hints = get_type_hints(handler["handler"])
# Remove return type hint as we don't need it because it had caused
# a validation error for any handler function that had a return type hint
if "return" in handler_type_hints:
del handler_type_hints["return"]
dependency_injection: dict[str, Any] = {}
for k, v in handler_type_hints.items():
if v == Request:
Expand Down

0 comments on commit a8ce1f0

Please sign in to comment.