11# coding=utf-8
2- from typing_extensions import Literal
32import logging
43import os
54import re
6- from typing import TYPE_CHECKING , Any , BinaryIO , cast , Optional , Union , Dict , List
5+ from typing import Any , BinaryIO , Dict , List , Optional , Union , cast
76from warnings import warn
87
98from deprecated import deprecated
109from requests import HTTPError , Response
10+ from typing_extensions import Literal
1111
1212from .errors import ApiNotFoundError , ApiPermissionError
1313from .rest_client import AtlassianRestAPI
14-
15- if TYPE_CHECKING :
16- from .typehints import T_id , T_resp_json
14+ from .typehints import T_id , T_resp_json
1715
1816log = logging .getLogger (__name__ )
1917
@@ -234,7 +232,7 @@ def get_application_role(self, role_key: str) -> T_resp_json:
234232 def get_attachments_ids_from_issue (self , issue : T_id ) -> List [Dict [str , str ]]:
235233 """
236234 Get attachments IDs from jira issue
237- :param jira issue key: str
235+ :param issue: str jira issue key
238236 :return: list of integers attachment IDs
239237 """
240238 issue_id = self .get_issue (issue )["fields" ]["attachment" ]
@@ -512,7 +510,7 @@ def issue_get_comments(self, issue_id: T_id) -> T_resp_json:
512510 def issues_get_comments_by_id (self , * args : int ) -> T_resp_json :
513511 """
514512 Get Comments on Multiple Issues
515- :param * args: int Issue ID's
513+ :param args: int Issue ID's
516514 :raises: requests.exceptions.HTTPError
517515 :return:
518516 """
@@ -1431,7 +1429,7 @@ def get_issue_labels(self, issue_key: str) -> T_resp_json:
14311429
14321430 def update_issue (self , issue_key : T_id , update : Union [str , dict ]) -> T_resp_json :
14331431 """
1434- :param issue : the issue to update
1432+ :param issue_key : the issue to update
14351433 :param update: the update to make
14361434 :return: True if successful, False if not
14371435 """
@@ -1440,7 +1438,7 @@ def update_issue(self, issue_key: T_id, update: Union[str, dict]) -> T_resp_json
14401438
14411439 def label_issue (self , issue_key : T_id , labels : list ):
14421440 """
1443- :param issue : the issue to update
1441+ :param issue_key : the issue to update
14441442 :param labels: the labels to add
14451443 :return: True if successful, False if not
14461444 """
@@ -1485,7 +1483,7 @@ def issue_exists(self, issue_key: str) -> Optional[bool]:
14851483 original_value = self .advanced_mode
14861484 self .advanced_mode = True
14871485 try :
1488- resp = self .issue (issue_key , fields = "*none" )
1486+ resp = cast ( Response , self .issue (issue_key , fields = "*none" ) )
14891487 if resp .status_code == 404 :
14901488 log .info ('Issue "%s" does not exists' , issue_key )
14911489 return False
0 commit comments