@@ -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
@@ -1911,7 +1911,7 @@ def delete_issue_remote_link_by_id(self, issue_key: str, link_id: T_id) -> T_res
1911
1911
1912
1912
def get_issue_transitions (self , issue_key : str ) -> List [dict ]:
1913
1913
if self .advanced_mode :
1914
- resp = cast (Response , self .get_issue_transitions_full (issue_key ))
1914
+ resp = cast (" Response" , self .get_issue_transitions_full (issue_key ))
1915
1915
d : Dict [str , list ] = resp .json () or {}
1916
1916
else :
1917
1917
d = self .get_issue_transitions_full (issue_key ) or {}
@@ -1922,7 +1922,7 @@ def get_issue_transitions(self, issue_key: str) -> List[dict]:
1922
1922
"id" : int (transition ["id" ]),
1923
1923
"to" : transition ["to" ]["name" ],
1924
1924
}
1925
- for transition in cast (List [dict ], d .get ("transitions" ))
1925
+ for transition in cast (" List[dict]" , d .get ("transitions" ))
1926
1926
]
1927
1927
1928
1928
def issue_transition (self , issue_key : str , status : str ) -> T_resp_json :
@@ -3074,25 +3074,25 @@ def get_project_issuekey_last(self, project: str):
3074
3074
jql = f'project = "{ project } " ORDER BY issuekey DESC'
3075
3075
response = self .jql (jql )
3076
3076
if self .advanced_mode :
3077
- return cast (Response , response )
3077
+ return cast (" Response" , response )
3078
3078
3079
- return (cast (dict , response ).__getitem__ ("issues" ) or {"key" : None })[0 ]["key" ]
3079
+ return (cast (" dict" , response ).__getitem__ ("issues" ) or {"key" : None })[0 ]["key" ]
3080
3080
3081
3081
def get_project_issuekey_all (
3082
3082
self , project : str , start : int = 0 , limit : Optional [int ] = None , expand : Optional [str ] = None
3083
3083
):
3084
3084
jql = f'project = "{ project } " ORDER BY issuekey ASC'
3085
3085
response = self .jql (jql , start = start , limit = limit , expand = expand )
3086
3086
if self .advanced_mode :
3087
- return cast (Response , response )
3088
- return [issue ["key" ] for issue in cast (dict , response )["issues" ]]
3087
+ return cast (" Response" , response )
3088
+ return [issue ["key" ] for issue in cast (" dict" , response )["issues" ]]
3089
3089
3090
3090
def get_project_issues_count (self , project : str ):
3091
3091
jql = f'project = "{ project } " '
3092
3092
response = self .jql (jql , fields = "*none" )
3093
3093
if self .advanced_mode :
3094
- return cast (Response , response )
3095
- return cast (dict , response )["total" ]
3094
+ return cast (" Response" , response )
3095
+ return cast (" dict" , response )["total" ]
3096
3096
3097
3097
def get_all_project_issues (
3098
3098
self , project : str , fields : Union [str , List [str ]] = "*all" , start : int = 0 , limit : Optional [int ] = None
@@ -3108,8 +3108,8 @@ def get_all_project_issues(
3108
3108
jql = f'project = "{ project } " ORDER BY key'
3109
3109
response = self .jql (jql , fields = fields , start = start , limit = limit )
3110
3110
if self .advanced_mode :
3111
- return cast (Response , response )
3112
- return cast (dict , response )["issues" ]
3111
+ return cast (" Response" , response )
3112
+ return cast (" dict" , response )["issues" ]
3113
3113
3114
3114
def get_all_assignable_users_for_project (self , project_key : str , start : int = 0 , limit : int = 50 ):
3115
3115
"""
0 commit comments