Skip to content

Commit d055609

Browse files
committed
run black formatter and remove unused import in tests file
1 parent 63e744f commit d055609

6 files changed

Lines changed: 16 additions & 12 deletions

File tree

atlassian/confluence/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ def __init__(self, url, *args, **kwargs):
2525
if is_cloud is None:
2626
hostname = urlparse(url).hostname or ""
2727
is_cloud = (
28-
hostname == "atlassian.net" or hostname.endswith(".atlassian.net")
29-
or hostname == "jira.com" or hostname.endswith(".jira.com")
30-
or hostname == "api.atlassian.com" or hostname.endswith(".api.atlassian.com")
28+
hostname == "atlassian.net"
29+
or hostname.endswith(".atlassian.net")
30+
or hostname == "jira.com"
31+
or hostname.endswith(".jira.com")
32+
or hostname == "api.atlassian.com"
33+
or hostname.endswith(".api.atlassian.com")
3134
)
3235
if is_cloud:
3336
impl = ConfluenceCloud(url, *args, **kwargs)

atlassian/confluence/cloud/base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,3 @@ def __init__(self, url, *args, **kwargs):
2323
:return: nothing
2424
"""
2525
super(ConfluenceCloudBase, self).__init__(url, *args, **kwargs)
26-
27-

atlassian/confluence/server/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,9 @@ def get_all_draft_pages_from_space(self, space_key, **kwargs):
297297

298298
def get_all_draft_blog_posts_from_space(self, space_key, **kwargs):
299299
"""Get all draft blog posts from space."""
300-
return self._get_paged("content", params={"spaceKey": space_key, "type": "blogpost", "status": "draft", **kwargs})
300+
return self._get_paged(
301+
"content", params={"spaceKey": space_key, "type": "blogpost", "status": "draft", **kwargs}
302+
)
301303

302304
# Trash Management
303305
def get_trash_content(self, space_key, **kwargs):
@@ -310,7 +312,9 @@ def get_all_pages_from_space_trash(self, space_key, **kwargs):
310312

311313
def get_all_blog_posts_from_space_trash(self, space_key, **kwargs):
312314
"""Get all blog posts from space trash."""
313-
return self._get_paged("content", params={"spaceKey": space_key, "type": "blogpost", "status": "trashed", **kwargs})
315+
return self._get_paged(
316+
"content", params={"spaceKey": space_key, "type": "blogpost", "status": "trashed", **kwargs}
317+
)
314318

315319
# Export
316320
def export_content(self, content_id, **kwargs):

atlassian/confluence/server/base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,3 @@ def __init__(self, url, *args, **kwargs):
2323
:return: nothing
2424
"""
2525
super(ConfluenceServerBase, self).__init__(url, *args, **kwargs)
26-
27-

tests/confluence/test_confluence_cloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ def test_pagination_with_relative_next_link_and_base(self, mock_get, confluence_
579579
assert result == [{"id": "1", "title": "Page 1"}, {"id": "2", "title": "Page 2"}]
580580

581581
assert mock_get.call_count == 2
582-
582+
583583
# Verify the second call used scheme+host from self.url (preserving API gateway routing)
584584
args, kwargs = mock_get.call_args_list[1]
585585
assert args[0] == "https://test.atlassian.net/rest/api/content?cursor=1"

tests/confluence/test_confluence_routing.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# coding=utf-8
22
"""Tests for legacy Confluence class URL routing."""
33

4-
from unittest.mock import patch, MagicMock
4+
from unittest.mock import patch
5+
# from unittest.mock import MagicMock
56

6-
import pytest
7+
# import pytest
78

89
from atlassian.confluence import Confluence, ConfluenceCloud, ConfluenceServer
910

0 commit comments

Comments
 (0)