@@ -56,7 +56,7 @@ def _get_paged(
56
56
57
57
while True :
58
58
response = cast (
59
- dict ,
59
+ " dict" ,
60
60
super (Jira , self ).get (
61
61
url ,
62
62
trailing = trailing ,
@@ -73,7 +73,7 @@ def _get_paged(
73
73
if response .get ("isLast" , False ) or len (values ) == 0 :
74
74
break
75
75
76
- url = cast (str , response .get ("nextPage" ))
76
+ url = cast (" str" , response .get ("nextPage" ))
77
77
if url is None :
78
78
break
79
79
# From now on we have absolute URLs with parameters
@@ -1484,7 +1484,7 @@ def issue_exists(self, issue_key: str) -> Optional[bool]:
1484
1484
original_value = self .advanced_mode
1485
1485
self .advanced_mode = True
1486
1486
try :
1487
- resp = cast (Response , self .issue (issue_key , fields = "*none" ))
1487
+ resp = cast (" Response" , self .issue (issue_key , fields = "*none" ))
1488
1488
if resp .status_code == 404 :
1489
1489
log .info ('Issue "%s" does not exists' , issue_key )
1490
1490
return False
@@ -1915,7 +1915,7 @@ def delete_issue_remote_link_by_id(self, issue_key: str, link_id: T_id) -> T_res
1915
1915
1916
1916
def get_issue_transitions (self , issue_key : str ) -> List [dict ]:
1917
1917
if self .advanced_mode :
1918
- resp = cast (Response , self .get_issue_transitions_full (issue_key ))
1918
+ resp = cast (" Response" , self .get_issue_transitions_full (issue_key ))
1919
1919
d : Dict [str , list ] = resp .json () or {}
1920
1920
else :
1921
1921
d = self .get_issue_transitions_full (issue_key ) or {}
@@ -1926,7 +1926,7 @@ def get_issue_transitions(self, issue_key: str) -> List[dict]:
1926
1926
"id" : int (transition ["id" ]),
1927
1927
"to" : transition ["to" ]["name" ],
1928
1928
}
1929
- for transition in cast (List [dict ], d .get ("transitions" ))
1929
+ for transition in cast (" List[dict]" , d .get ("transitions" ))
1930
1930
]
1931
1931
1932
1932
def issue_transition (self , issue_key : str , status : str ) -> T_resp_json :
@@ -3078,25 +3078,25 @@ def get_project_issuekey_last(self, project: str):
3078
3078
jql = f'project = "{ project } " ORDER BY issuekey DESC'
3079
3079
response = self .jql (jql )
3080
3080
if self .advanced_mode :
3081
- return cast (Response , response )
3081
+ return cast (" Response" , response )
3082
3082
3083
- return (cast (dict , response ).__getitem__ ("issues" ) or {"key" : None })[0 ]["key" ]
3083
+ return (cast (" dict" , response ).__getitem__ ("issues" ) or {"key" : None })[0 ]["key" ]
3084
3084
3085
3085
def get_project_issuekey_all (
3086
3086
self , project : str , start : int = 0 , limit : Optional [int ] = None , expand : Optional [str ] = None
3087
3087
):
3088
3088
jql = f'project = "{ project } " ORDER BY issuekey ASC'
3089
3089
response = self .jql (jql , start = start , limit = limit , expand = expand )
3090
3090
if self .advanced_mode :
3091
- return cast (Response , response )
3092
- return [issue ["key" ] for issue in cast (dict , response )["issues" ]]
3091
+ return cast (" Response" , response )
3092
+ return [issue ["key" ] for issue in cast (" dict" , response )["issues" ]]
3093
3093
3094
3094
def get_project_issues_count (self , project : str ):
3095
3095
jql = f'project = "{ project } " '
3096
3096
response = self .jql (jql , fields = "*none" )
3097
3097
if self .advanced_mode :
3098
- return cast (Response , response )
3099
- return cast (dict , response )["total" ]
3098
+ return cast (" Response" , response )
3099
+ return cast (" dict" , response )["total" ]
3100
3100
3101
3101
def get_all_project_issues (
3102
3102
self , project : str , fields : Union [str , List [str ]] = "*all" , start : int = 0 , limit : Optional [int ] = None
@@ -3112,8 +3112,8 @@ def get_all_project_issues(
3112
3112
jql = f'project = "{ project } " ORDER BY key'
3113
3113
response = self .jql (jql , fields = fields , start = start , limit = limit )
3114
3114
if self .advanced_mode :
3115
- return cast (Response , response )
3116
- return cast (dict , response )["issues" ]
3115
+ return cast (" Response" , response )
3116
+ return cast (" dict" , response )["issues" ]
3117
3117
3118
3118
def get_all_assignable_users_for_project (self , project_key : str , start : int = 0 , limit : int = 50 ):
3119
3119
"""
0 commit comments