Skip to content

Commit 3fd59ea

Browse files
committed
run black formatter
1 parent 0a09708 commit 3fd59ea

13 files changed

Lines changed: 24 additions & 54 deletions

atlassian/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from .tempo import TempoCloud, TempoServer
2020
from .xray import Xray
2121

22-
2322
__all__ = [
2423
"Confluence",
2524
"ConfluenceCloud",

atlassian/bamboo.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,7 @@ def _get_generator(
6262
logging.error(f"Broken response: {response}")
6363
yield response
6464

65-
def base_list_call(
66-
self,
67-
resource,
68-
expand,
69-
favourite,
70-
clover_enabled,
71-
max_results,
72-
label=None,
73-
start_index=0,
74-
**kwargs
75-
): # fmt: skip
65+
def base_list_call(self, resource, expand, favourite, clover_enabled, max_results, label=None, start_index=0, **kwargs): # fmt: skip
7666
flags = []
7767
params = {"max-results": max_results}
7868
if expand:
@@ -622,14 +612,7 @@ def delete_build_result(self, build_key):
622612
params = {"buildKey": plan_key, "buildNumber": build_number}
623613
return self.post(custom_resource, params=params, headers=self.form_token_headers)
624614

625-
def execute_build(
626-
self,
627-
plan_key,
628-
stage=None,
629-
execute_all_stages=True,
630-
custom_revision=None,
631-
**bamboo_variables
632-
): # fmt: skip
615+
def execute_build(self, plan_key, stage=None, execute_all_stages=True, custom_revision=None, **bamboo_variables): # fmt: skip
633616
"""
634617
Fire build execution for specified plan.
635618
!IMPORTANT! NOTE: for some reason, this method always execute all stages

atlassian/bitbucket/__init__.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2568,15 +2568,7 @@ def delete_code_insights_report(self, project_key, repository_slug, commit_id, r
25682568
url = self._url_code_insights_report(project_key, repository_slug, commit_id, report_key)
25692569
return self.delete(url)
25702570

2571-
def create_code_insights_report(
2572-
self,
2573-
project_key,
2574-
repository_slug,
2575-
commit_id,
2576-
report_key,
2577-
report_title,
2578-
**report_params
2579-
): # fmt: skip
2571+
def create_code_insights_report(self, project_key, repository_slug, commit_id, report_key, report_title, **report_params): # fmt: skip
25802572
"""
25812573
Create a new insight report, or replace the existing one
25822574
if a report already exists for the given repository_slug, commit, and report key.

atlassian/rest_client.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,12 @@ def _handle(response):
359359
delay = self._parse_retry_after_header(response.headers.get("Retry-After"))
360360
if delay is not None:
361361
retry_with_header_count += 1
362-
log.debug("Retrying after %s seconds (attempt %d/%d)", delay, retry_with_header_count, max_retry_with_header_attempts)
362+
log.debug(
363+
"Retrying after %s seconds (attempt %d/%d)",
364+
delay,
365+
retry_with_header_count,
366+
max_retry_with_header_attempts,
367+
)
363368
time.sleep(delay)
364369
return True
365370

atlassian/statuspage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# coding=utf-8
22
"""Statuspage API wrapper."""
3+
34
import logging
45
from enum import Enum
56

atlassian/utils.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,12 @@ def block_code_macro_confluence(code, lang=None):
213213
"""
214214
if not lang:
215215
lang = ""
216-
return (
217-
"""\
216+
return ("""\
218217
<ac:structured-macro ac:name="code" ac:schema-version="1">
219218
<ac:parameter ac:name="language">{lang}</ac:parameter>
220219
<ac:plain-text-body><![CDATA[{code}]]></ac:plain-text-body>
221220
</ac:structured-macro>
222-
"""
223-
).format(lang=lang, code=code)
221+
""").format(lang=lang, code=code)
224222

225223

226224
def html_code__macro_confluence(text):
@@ -229,13 +227,11 @@ def html_code__macro_confluence(text):
229227
:param text:
230228
:return:
231229
"""
232-
return (
233-
"""\
230+
return ("""\
234231
<ac:structured-macro ac:name="html" ac:schema-version="1">
235232
<ac:plain-text-body><![CDATA[{text}]]></ac:plain-text-body>
236233
</ac:structured-macro>
237-
"""
238-
).format(text=text)
234+
""").format(text=text)
239235

240236

241237
def noformat_code_macro_confluence(text, nopanel=None):
@@ -247,14 +243,12 @@ def noformat_code_macro_confluence(text, nopanel=None):
247243
"""
248244
if not nopanel:
249245
nopanel = False
250-
return (
251-
"""\
246+
return ("""\
252247
<ac:structured-macro ac:name="noformat" ac:schema-version="1">
253248
<ac:parameter ac:name="nopanel">{nopanel}</ac:parameter>
254249
<ac:plain-text-body><![CDATA[{text}]]></ac:plain-text-body>
255250
</ac:structured-macro>
256-
"""
257-
).format(nopanel=nopanel, text=text)
251+
""").format(nopanel=nopanel, text=text)
258252

259253

260254
def symbol_normalizer(text):

examples/confluence/confluence_attach_file.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
This is example to attach file with mimetype
44
55
"""
6+
67
import logging
78

89
# https://pypi.org/project/python-magic/

examples/confluence/confluence_scrap_regex_from_page.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from atlassian import Confluence
22

3-
43
confluence = Confluence(
54
url="<instance_url>",
65
username="<user_enamil>",

examples/jira/jira_admins_confluence_page.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@
1212

1313
confluence = Confluence(url="http://localhost:8090", username="admin", password="admin")
1414

15-
html = [
16-
"""<table>
15+
html = ["""<table>
1716
<tr>
1817
<th>Project Key</th>
1918
<th>Project Name</th>
2019
<th>Leader</th>
2120
<th>Email</th>
22-
</tr>"""
23-
]
21+
</tr>"""]
2422

2523
for data in jira.project_leaders():
2624
log.info("{project_key} leader is {lead_name} <{lead_email}>".format(**data))

examples/jira/jira_project_administrators.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
<td>{project_name}</td>
1818
<td>{lead_name}</td>
1919
<td><a href="mailto:{lead_email}">{lead_email}</a></td>
20-
</tr>""".format(
21-
**data
22-
)
20+
</tr>""".format(**data)
2321

2422
html += "</table>"
2523

0 commit comments

Comments
 (0)