diff --git a/atlassian/bitbucket/cloud/repositories/__init__.py b/atlassian/bitbucket/cloud/repositories/__init__.py index c0ab116c7..e1573d6ea 100644 --- a/atlassian/bitbucket/cloud/repositories/__init__.py +++ b/atlassian/bitbucket/cloud/repositories/__init__.py @@ -263,7 +263,7 @@ def __init__(self, data, *args, **kwargs): self.__hooks = Hooks( "{}/hooks".format(self.url), data={"links": {"hooks": {"href": "{}/hooks".format(self.url)}}}, - **self._new_session_args, + **self._new_session_args ) self.__default_reviewers = DefaultReviewers("{}/default-reviewers".format(self.url), **self._new_session_args) self.__deployment_environments = DeploymentEnvironments( diff --git a/atlassian/confluence.py b/atlassian/confluence.py index f8d102f4b..274c9b46b 100644 --- a/atlassian/confluence.py +++ b/atlassian/confluence.py @@ -1340,7 +1340,7 @@ def download_attachments_from_page(self, page_id, path=None): if not file_name: file_name = attachment["id"] # if the attachment has no title, use attachment_id as a filename download_link = self.url + attachment["_links"]["download"] - r = self._session.get(f"{download_link}") + r = self._session.get(str(download_link)) file_path = os.path.join(path, file_name) with open(file_path, "wb") as f: f.write(r.content) diff --git a/atlassian/jira.py b/atlassian/jira.py index bd24798a6..c5a1f5eeb 100644 --- a/atlassian/jira.py +++ b/atlassian/jira.py @@ -255,11 +255,11 @@ def download_attachments_from_issue(self, issue, path=None, cloud=True): path = os.getcwd() issue_id = self.issue(issue, fields="id")["id"] if cloud: - url = self.url + f"/secure/issueAttachments/{issue_id}.zip" + url = self.url + "/secure/issueAttachments/{}.zip".format(issue_id) else: - url = self.url + f"/secure/attachmentzip/{issue_id}.zip" + url = self.url + "/secure/attachmentzip/{}.zip".format(issue_id) response = self._session.get(url) - attachment_name = f"{issue_id}_attachments.zip" + attachment_name = "{}_attachments.zip".format(issue_id) file_path = os.path.join(path, attachment_name) # if Jira issue doesn't have any attachments _session.get request response will return 22 bytes of PKzip format file_size = sum(len(chunk) for chunk in response.iter_content(8196)) diff --git a/tox.ini b/tox.ini index b8c071931..090589552 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,7 @@ commands = pylint {[base]linting_targets} [testenv:black] basepython = python3 -target-version = ["py37"] +target-version = ["py27", "py37"] skip_install = true deps = black commands = black --check --diff {[base]linting_targets} --exclude __pycache__