From 170fe3fc2bce6cf6090aaf3f231b1b1a6e570cbb Mon Sep 17 00:00:00 2001 From: Emmanuel Leblond Date: Tue, 25 Oct 2022 14:24:16 +0200 Subject: [PATCH] Fix typing for abort to accept Response object --- src/quart/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quart/helpers.py b/src/quart/helpers.py index f61b3fa5..cf704287 100644 --- a/src/quart/helpers.py +++ b/src/quart/helpers.py @@ -389,7 +389,7 @@ def _split_blueprint_path(name: str) -> List[str]: return bps -def abort(code: int, *args: Any, **kwargs: Any) -> NoReturn: # type: ignore[misc] +def abort(code: int | Response, *args: Any, **kwargs: Any) -> NoReturn: """Raise an HTTPException for the given status code.""" if current_app: current_app.aborter(code, *args, **kwargs)