From 1ab605a42da9ddf4bf0f267fa0e854d4c435a8de Mon Sep 17 00:00:00 2001 From: Michael Kaye <1917473+michaelkaye@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:54:16 +0000 Subject: [PATCH] Typing? --- trafficlight/http/status.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/trafficlight/http/status.py b/trafficlight/http/status.py index 7dca107..ed55cbf 100644 --- a/trafficlight/http/status.py +++ b/trafficlight/http/status.py @@ -13,9 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. import logging -from typing import List +from typing import List, Union -from quart import Blueprint, abort, render_template, request, send_file +from quart import Blueprint, abort, render_template, request, send_file, Response from trafficlight.internals.testsuite import TestSuite from trafficlight.store import ( @@ -63,7 +63,7 @@ async def as_junit(): # type: ignore @bp.route("//files/", methods=["GET"]) -async def test_file(guid: str, name: str): # type: ignore +async def test_file(guid: str, name: str) -> Response: test = get_test_case(guid) logger.info("Getting ${guid} ${name}") if name in test.files: @@ -74,7 +74,7 @@ async def test_file(guid: str, name: str): # type: ignore @bp.route("//suitestatus", methods=["GET"]) -async def testsuite_status(guid: str): # type: ignore +async def testsuite_status(guid: str) -> str: refresh = request.args.get("refresh", default=0, type=int) testsuite = get_testsuite(guid) if testsuite is not None: @@ -86,7 +86,7 @@ async def testsuite_status(guid: str): # type: ignore @bp.route("//status", methods=["GET"]) -async def testcase_status(guid: str): # type: ignore +async def testcase_status(guid: str) -> Union[str, Response]: refresh = request.args.get("refresh", default=0, type=int) logger.info("Finding test %s", guid) test = get_test_case(guid)