Skip to content

Commit 65e0ed1

Browse files
committed
feat: typing update
1 parent 6b18c46 commit 65e0ed1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/argowrapper/routes/routes.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from functools import wraps
33
from typing import Any, Dict, List, Optional, Union
44

5-
from fastapi import APIRouter, Request, Query, Response
5+
from fastapi import APIRouter, Request, Query
66
from fastapi.responses import HTMLResponse
77
from starlette.status import (
88
HTTP_200_OK,
@@ -220,7 +220,7 @@ def test():
220220
def submit_workflow(
221221
request_body: Dict[Any, Any],
222222
request: Request, # pylint: disable=unused-argument
223-
) -> Union[str, Response]:
223+
) -> Union[str, Any]:
224224
"""route to submit workflow"""
225225
try:
226226
return argo_engine.workflow_submission(
@@ -247,7 +247,7 @@ def get_workflow_details(
247247
workflow_name: str,
248248
uid: str,
249249
request: Request, # pylint: disable=unused-argument
250-
) -> Union[Dict[str, Any], str, Response]:
250+
) -> Union[Dict[str, Any], str, Any]:
251251
"""returns details of a workflow"""
252252

253253
try:
@@ -268,7 +268,7 @@ def retry_workflow(
268268
workflow_name: str,
269269
uid: str,
270270
request: Request, # pylint: disable=unused-argument
271-
) -> Union[str, Response]:
271+
) -> Union[str, Any]:
272272
"""retries a currently failed workflow"""
273273
workflow_details = argo_engine.get_workflow_details(workflow_name, uid)
274274
try:
@@ -295,7 +295,7 @@ def retry_workflow(
295295
def cancel_workflow(
296296
workflow_name: str,
297297
request: Request, # pylint: disable=unused-argument
298-
) -> Union[str, Response]:
298+
) -> Union[str, Any]:
299299
"""cancels a currently running workflow"""
300300

301301
try:
@@ -315,7 +315,7 @@ def cancel_workflow(
315315
def get_workflows(
316316
request: Request, # pylint: disable=unused-argument
317317
team_projects: Optional[List[str]] = Query(default=None),
318-
) -> Union[List[Dict], Response]:
318+
) -> Union[List[Dict], Any]:
319319
"""returns the list of workflows the user has ran"""
320320

321321
try:
@@ -344,7 +344,7 @@ def get_workflow_logs(
344344
workflow_name: str,
345345
uid: str,
346346
request: Request, # pylint: disable=unused-argument
347-
) -> Union[List[Dict], Response]:
347+
) -> Union[List[Dict], Any]:
348348
"""returns the list of workflows the user has ran"""
349349

350350
try:

0 commit comments

Comments
 (0)