5
5
from enum import StrEnum
6
6
from importlib import resources
7
7
from io import BytesIO , StringIO
8
- from typing import Any , Dict , List , Optional , Union
8
+ from typing import Any , Dict , List , Optional , Union , cast
9
9
from uuid import UUID , uuid4
10
10
11
11
import httpx
@@ -1244,10 +1244,8 @@ async def update_submission(
1244
1244
if body_dict .get ("status" , None ):
1245
1245
new_status = body_dict ["status" ]
1246
1246
allowed_transitions = {
1247
- SubmissionStatusEnum .UpdatesRequired .text :
1248
- SubmissionStatusEnum .InProgress .text ,
1249
- SubmissionStatusEnum .InProgress .text :
1250
- SubmissionStatusEnum .SubmittedPendingReview .text ,
1247
+ SubmissionStatusEnum .UpdatesRequired .text : SubmissionStatusEnum .InProgress .text ,
1248
+ SubmissionStatusEnum .InProgress .text : SubmissionStatusEnum .SubmittedPendingReview .text ,
1251
1249
}
1252
1250
current_status = submission .status
1253
1251
if (
@@ -1400,7 +1398,7 @@ def update_github_issue_for_resubmission(existing_issue, user, headers):
1400
1398
return existing_issue
1401
1399
1402
1400
1403
- def check_existing_github_issue (submission_id : str , headers : dict , gh_base_url : str , user ):
1401
+ def check_existing_github_issue (submission_id : UUID , headers : dict , gh_base_url : str , user ):
1404
1402
"""
1405
1403
Check if a GitHub issue already exists for the given submission ID using GitHub's search API.
1406
1404
"""
@@ -1412,7 +1410,7 @@ def check_existing_github_issue(submission_id: str, headers: dict, gh_base_url:
1412
1410
"state" : "all" ,
1413
1411
"per_page" : 100 ,
1414
1412
}
1415
- response = requests .get (search_url , headers = headers , params = params )
1413
+ response = requests .get (search_url , headers = headers , params = cast ( Any , params ) )
1416
1414
1417
1415
if response .status_code == 200 :
1418
1416
issues = response .json ()
0 commit comments