Skip to content

Commit cfde828

Browse files
committed
black polish
1 parent 65185cb commit cfde828

File tree

4 files changed

+85
-92
lines changed

4 files changed

+85
-92
lines changed

examples/bitbucket/bitbucket_pr_commits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from atlassian.bitbucket import Cloud
22

3-
bitbucket = Cloud(url='https://api.bitbucket.org/', token='random_string_token')
3+
bitbucket = Cloud(url="https://api.bitbucket.org/", token="random_string_token")
44

55
pr_id = 1
66

temp_file.md

Whitespace-only changes.
Lines changed: 83 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,88 @@
11
responses[None] = {
2-
"values": [
3-
{
4-
"type": "commit",
5-
"hash": "3a8d6c7910f7bf68f7cf9cc1964998006fa8894b",
6-
"date": "2023-10-08T17:31:20+00:00",
7-
"author": {
8-
"type": "author",
9-
"raw": "user1Name <user@mail.com>",
10-
"user": {
11-
"display_name": "user1Name",
12-
"links": {
13-
"self": {
14-
"href": "https://api.bitbucket.org/2.0/users/%7B34318d8b-6c8a-40a7-aea2-572fdd183917%7D"
2+
"values": [
3+
{
4+
"type": "commit",
5+
"hash": "3a8d6c7910f7bf68f7cf9cc1964998006fa8894b",
6+
"date": "2023-10-08T17:31:20+00:00",
7+
"author": {
8+
"type": "author",
9+
"raw": "user1Name <user@mail.com>",
10+
"user": {
11+
"display_name": "user1Name",
12+
"links": {
13+
"self": {
14+
"href": "https://api.bitbucket.org/2.0/users/%7B34318d8b-6c8a-40a7-aea2-572fdd183917%7D"
15+
},
16+
"avatar": {
17+
"href": "https://secure.gravatar.com/avatar/679c684730037c1250b46c1781701f98?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FIP-3.png"
18+
},
19+
"html": {"href": "https://bitbucket.org/%7B34318d8b-6c8a-40a7-aea2-572fdd183917%7D/"},
20+
},
21+
"type": "user",
22+
"uuid": "{34318d8b-6c8a-40a7-aea2-572fdd183917}",
23+
"account_id": "557058:e7042a01-54b7-447f-9da8-4ad1b1e4afa5",
24+
"nickname": "user1Name",
25+
},
1526
},
16-
"avatar": {
17-
"href": "https://secure.gravatar.com/avatar/679c684730037c1250b46c1781701f98?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FIP-3.png"
27+
"message": "src created online with Bitbucket",
28+
"summary": {
29+
"type": "rendered",
30+
"raw": "src created online with Bitbucket",
31+
"markup": "markdown",
32+
"html": "<p>src created online with Bitbucket</p>",
1833
},
19-
"html": {
20-
"href": "https://bitbucket.org/%7B34318d8b-6c8a-40a7-aea2-572fdd183917%7D/"
21-
}
22-
},
23-
"type": "user",
24-
"uuid": "{34318d8b-6c8a-40a7-aea2-572fdd183917}",
25-
"account_id": "557058:e7042a01-54b7-447f-9da8-4ad1b1e4afa5",
26-
"nickname": "user1Name"
27-
}
28-
},
29-
"message": "src created online with Bitbucket",
30-
"summary": {
31-
"type": "rendered",
32-
"raw": "src created online with Bitbucket",
33-
"markup": "markdown",
34-
"html": "<p>src created online with Bitbucket</p>"
35-
},
36-
"links": {
37-
"self": {
38-
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1/commit/3a8d6c7910f7bf68f7cf9cc1964998006fa8894b"
39-
},
40-
"html": {
41-
"href": "https://bitbucket.org/TestWorkspace1/testrepository1/commits/3a8d6c7910f7bf68f7cf9cc1964998006fa8894b"
42-
},
43-
"diff": {
44-
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1/diff/3a8d6c7910f7bf68f7cf9cc1964998006fa8894b"
45-
},
46-
"approve": {
47-
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1/commit/3a8d6c7910f7bf68f7cf9cc1964998006fa8894b/approve"
48-
},
49-
"comments": {
50-
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1/commit/3a8d6c7910f7bf68f7cf9cc1964998006fa8894b/comments"
51-
},
52-
"statuses": {
53-
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1/commit/3a8d6c7910f7bf68f7cf9cc1964998006fa8894b/statuses"
54-
},
55-
"patch": {
56-
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1/patch/3a8d6c7910f7bf68f7cf9cc1964998006fa8894b"
57-
}
58-
},
59-
"parents": [
60-
{
61-
"hash": "08b01c378b0c67999528bdb5d364d1960409cd99",
62-
"links": {
63-
"self": {
64-
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1/commit/08b01c378b0c67999528bdb5d364d1960409cd99"
34+
"links": {
35+
"self": {
36+
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1/commit/3a8d6c7910f7bf68f7cf9cc1964998006fa8894b"
37+
},
38+
"html": {
39+
"href": "https://bitbucket.org/TestWorkspace1/testrepository1/commits/3a8d6c7910f7bf68f7cf9cc1964998006fa8894b"
40+
},
41+
"diff": {
42+
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1/diff/3a8d6c7910f7bf68f7cf9cc1964998006fa8894b"
43+
},
44+
"approve": {
45+
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1/commit/3a8d6c7910f7bf68f7cf9cc1964998006fa8894b/approve"
46+
},
47+
"comments": {
48+
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1/commit/3a8d6c7910f7bf68f7cf9cc1964998006fa8894b/comments"
49+
},
50+
"statuses": {
51+
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1/commit/3a8d6c7910f7bf68f7cf9cc1964998006fa8894b/statuses"
52+
},
53+
"patch": {
54+
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1/patch/3a8d6c7910f7bf68f7cf9cc1964998006fa8894b"
55+
},
56+
},
57+
"parents": [
58+
{
59+
"hash": "08b01c378b0c67999528bdb5d364d1960409cd99",
60+
"links": {
61+
"self": {
62+
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1/commit/08b01c378b0c67999528bdb5d364d1960409cd99"
63+
},
64+
"html": {
65+
"href": "https://bitbucket.org/TestWorkspace1/testrepository1/commits/08b01c378b0c67999528bdb5d364d1960409cd99"
66+
},
67+
},
68+
"type": "commit",
69+
}
70+
],
71+
"repository": {
72+
"type": "repository",
73+
"full_name": "TestWorkspace1/testrepository1",
74+
"links": {
75+
"self": {"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1"},
76+
"html": {"href": "https://bitbucket.org/TestWorkspace1/testrepository1"},
77+
"avatar": {
78+
"href": "https://bytebucket.org/ravatar/%7Bc4f5c559-de42-4b98-8502-4d73ee76c393%7D?ts=default"
79+
},
80+
},
81+
"name": "testrepository1",
82+
"uuid": "{n789754-de42-4b98-8502-4d73ee76c393}",
6583
},
66-
"html": {
67-
"href": "https://bitbucket.org/TestWorkspace1/testrepository1/commits/08b01c378b0c67999528bdb5d364d1960409cd99"
68-
}
69-
},
70-
"type": "commit"
7184
}
72-
],
73-
"repository": {
74-
"type": "repository",
75-
"full_name": "TestWorkspace1/testrepository1",
76-
"links": {
77-
"self": {
78-
"href": "https://api.bitbucket.org/2.0/repositories/TestWorkspace1/testrepository1"
79-
},
80-
"html": {
81-
"href": "https://bitbucket.org/TestWorkspace1/testrepository1"
82-
},
83-
"avatar": {
84-
"href": "https://bytebucket.org/ravatar/%7Bc4f5c559-de42-4b98-8502-4d73ee76c393%7D?ts=default"
85-
}
86-
},
87-
"name": "testrepository1",
88-
"uuid": "{n789754-de42-4b98-8502-4d73ee76c393}"
89-
}
90-
}
91-
],
92-
"pagelen": 10,
93-
"page": 1
94-
}
85+
],
86+
"pagelen": 10,
87+
"page": 1,
88+
}

tests/test_bitbucket_cloud_oo.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,7 @@ def test_commits(self, tc1):
272272
assert len(pr_commits) == 1
273273
commit_1 = pr_commits[0]
274274
assert isinstance(commit_1, Commit)
275-
assert commit_1.message == 'src created online with Bitbucket'
276-
275+
assert commit_1.message == "src created online with Bitbucket"
277276

278277
def test_comment(self, tc1):
279278
msg = "hello world"

0 commit comments

Comments
 (0)