|
1 | 1 | # coding=utf-8
|
2 |
| -from typing_extensions import Literal |
3 | 2 | import logging
|
4 | 3 | import os
|
5 | 4 | import 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 |
7 | 6 | from warnings import warn
|
8 | 7 |
|
9 | 8 | from deprecated import deprecated
|
10 | 9 | from requests import HTTPError, Response
|
| 10 | +from typing_extensions import Literal |
11 | 11 |
|
12 | 12 | from .errors import ApiNotFoundError, ApiPermissionError
|
13 | 13 | from .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 |
17 | 15 |
|
18 | 16 | log = logging.getLogger(__name__)
|
19 | 17 |
|
@@ -523,7 +521,7 @@ def issue_get_comments(self, issue_id: T_id) -> T_resp_json:
|
523 | 521 | def issues_get_comments_by_id(self, *args: int) -> T_resp_json:
|
524 | 522 | """
|
525 | 523 | Get Comments on Multiple Issues
|
526 |
| - :param *args: int Issue ID's |
| 524 | + :param args: int Issue ID's |
527 | 525 | :raises: requests.exceptions.HTTPError
|
528 | 526 | :return:
|
529 | 527 | """
|
@@ -1486,7 +1484,7 @@ def issue_exists(self, issue_key: str) -> Optional[bool]:
|
1486 | 1484 | original_value = self.advanced_mode
|
1487 | 1485 | self.advanced_mode = True
|
1488 | 1486 | try:
|
1489 |
| - resp = self.issue(issue_key, fields="*none") |
| 1487 | + resp = cast(Response, self.issue(issue_key, fields="*none")) |
1490 | 1488 | if resp.status_code == 404:
|
1491 | 1489 | log.info('Issue "%s" does not exists', issue_key)
|
1492 | 1490 | return False
|
|
0 commit comments