Skip to content

Commit d25247b

Browse files
committed
future annotations aren't available in 3.6
1 parent 448f1b9 commit d25247b

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

atlassian/bitbucket/cloud/repositories/repositoryVariables.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# coding=utf-8
2-
from __future__ import annotations
32
from ..base import BitbucketCloudBase
43

54

65
class RepositoryVariables(BitbucketCloudBase):
76
def __init__(self, url, *args, **kwargs):
87
super(RepositoryVariables, self).__init__(url, *args, **kwargs)
98

10-
def __get_object(self, data) -> RepositoryVariable:
9+
def __get_object(self, data) -> "RepositoryVariable":
1110
return RepositoryVariable(
1211
self.url_joiner(self.url, data["uuid"]),
1312
data,

atlassian/jira.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
# coding=utf-8
2-
from typing_extensions import Literal
32
import logging
43
import os
54
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
76
from warnings import warn
87

98
from deprecated import deprecated
109
from requests import HTTPError, Response
10+
from typing_extensions import Literal
1111

1212
from .errors import ApiNotFoundError, ApiPermissionError
1313
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
1715

1816
log = logging.getLogger(__name__)
1917

@@ -523,7 +521,7 @@ def issue_get_comments(self, issue_id: T_id) -> T_resp_json:
523521
def issues_get_comments_by_id(self, *args: int) -> T_resp_json:
524522
"""
525523
Get Comments on Multiple Issues
526-
:param *args: int Issue ID's
524+
:param args: int Issue ID's
527525
:raises: requests.exceptions.HTTPError
528526
:return:
529527
"""
@@ -1486,7 +1484,7 @@ def issue_exists(self, issue_key: str) -> Optional[bool]:
14861484
original_value = self.advanced_mode
14871485
self.advanced_mode = True
14881486
try:
1489-
resp = self.issue(issue_key, fields="*none")
1487+
resp = cast(Response, self.issue(issue_key, fields="*none"))
14901488
if resp.status_code == 404:
14911489
log.info('Issue "%s" does not exists', issue_key)
14921490
return False

tests/test_confluence_advanced_mode.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# coding=utf-8
2-
from __future__ import annotations
3-
42
import json
53
import os
64
import unittest

0 commit comments

Comments
 (0)