2
2
from functools import wraps
3
3
from typing import Any , Dict , List , Optional , Union
4
4
5
- from fastapi import APIRouter , Request , Query , Response
5
+ from fastapi import APIRouter , Request , Query
6
6
from fastapi .responses import HTMLResponse
7
7
from starlette .status import (
8
8
HTTP_200_OK ,
@@ -220,7 +220,7 @@ def test():
220
220
def submit_workflow (
221
221
request_body : Dict [Any , Any ],
222
222
request : Request , # pylint: disable=unused-argument
223
- ) -> Union [str , Response ]:
223
+ ) -> Union [str , Any ]:
224
224
"""route to submit workflow"""
225
225
try :
226
226
return argo_engine .workflow_submission (
@@ -247,7 +247,7 @@ def get_workflow_details(
247
247
workflow_name : str ,
248
248
uid : str ,
249
249
request : Request , # pylint: disable=unused-argument
250
- ) -> Union [Dict [str , Any ], str , Response ]:
250
+ ) -> Union [Dict [str , Any ], str , Any ]:
251
251
"""returns details of a workflow"""
252
252
253
253
try :
@@ -268,7 +268,7 @@ def retry_workflow(
268
268
workflow_name : str ,
269
269
uid : str ,
270
270
request : Request , # pylint: disable=unused-argument
271
- ) -> Union [str , Response ]:
271
+ ) -> Union [str , Any ]:
272
272
"""retries a currently failed workflow"""
273
273
workflow_details = argo_engine .get_workflow_details (workflow_name , uid )
274
274
try :
@@ -295,7 +295,7 @@ def retry_workflow(
295
295
def cancel_workflow (
296
296
workflow_name : str ,
297
297
request : Request , # pylint: disable=unused-argument
298
- ) -> Union [str , Response ]:
298
+ ) -> Union [str , Any ]:
299
299
"""cancels a currently running workflow"""
300
300
301
301
try :
@@ -315,7 +315,7 @@ def cancel_workflow(
315
315
def get_workflows (
316
316
request : Request , # pylint: disable=unused-argument
317
317
team_projects : Optional [List [str ]] = Query (default = None ),
318
- ) -> Union [List [Dict ], Response ]:
318
+ ) -> Union [List [Dict ], Any ]:
319
319
"""returns the list of workflows the user has ran"""
320
320
321
321
try :
@@ -344,7 +344,7 @@ def get_workflow_logs(
344
344
workflow_name : str ,
345
345
uid : str ,
346
346
request : Request , # pylint: disable=unused-argument
347
- ) -> Union [List [Dict ], Response ]:
347
+ ) -> Union [List [Dict ], Any ]:
348
348
"""returns the list of workflows the user has ran"""
349
349
350
350
try :
0 commit comments