diff --git a/atlassian/__init__.py b/atlassian/__init__.py
index 5c17f3eed..8422e7dbb 100644
--- a/atlassian/__init__.py
+++ b/atlassian/__init__.py
@@ -19,7 +19,6 @@
from .tempo import TempoCloud, TempoServer
from .xray import Xray
-
__all__ = [
"Confluence",
"ConfluenceCloud",
diff --git a/atlassian/bamboo.py b/atlassian/bamboo.py
index a9fa51441..0447dad32 100755
--- a/atlassian/bamboo.py
+++ b/atlassian/bamboo.py
@@ -71,8 +71,8 @@ def base_list_call(
max_results,
label=None,
start_index=0,
- **kwargs
- ): # fmt: skip
+ **kwargs,
+ ):
flags = []
params = {"max-results": max_results}
if expand:
@@ -628,8 +628,8 @@ def execute_build(
stage=None,
execute_all_stages=True,
custom_revision=None,
- **bamboo_variables
- ): # fmt: skip
+ **bamboo_variables,
+ ):
"""
Fire build execution for specified plan.
!IMPORTANT! NOTE: for some reason, this method always execute all stages
diff --git a/atlassian/bitbucket/__init__.py b/atlassian/bitbucket/__init__.py
index 4e23a98a5..1a2be47e4 100644
--- a/atlassian/bitbucket/__init__.py
+++ b/atlassian/bitbucket/__init__.py
@@ -2575,8 +2575,8 @@ def create_code_insights_report(
commit_id,
report_key,
report_title,
- **report_params
- ): # fmt: skip
+ **report_params,
+ ):
"""
Create a new insight report, or replace the existing one
if a report already exists for the given repository_slug, commit, and report key.
diff --git a/atlassian/rest_client.py b/atlassian/rest_client.py
index 73a1619b2..79479457d 100644
--- a/atlassian/rest_client.py
+++ b/atlassian/rest_client.py
@@ -359,7 +359,12 @@ def _handle(response):
delay = self._parse_retry_after_header(response.headers.get("Retry-After"))
if delay is not None:
retry_with_header_count += 1
- log.debug("Retrying after %s seconds (attempt %d/%d)", delay, retry_with_header_count, max_retry_with_header_attempts)
+ log.debug(
+ "Retrying after %s seconds (attempt %d/%d)",
+ delay,
+ retry_with_header_count,
+ max_retry_with_header_attempts,
+ )
time.sleep(delay)
return True
diff --git a/atlassian/statuspage.py b/atlassian/statuspage.py
index 4bc047322..d084e2129 100644
--- a/atlassian/statuspage.py
+++ b/atlassian/statuspage.py
@@ -1,5 +1,6 @@
# coding=utf-8
"""Statuspage API wrapper."""
+
import logging
from enum import Enum
diff --git a/atlassian/utils.py b/atlassian/utils.py
index 24a479993..631d0111d 100644
--- a/atlassian/utils.py
+++ b/atlassian/utils.py
@@ -213,14 +213,12 @@ def block_code_macro_confluence(code, lang=None):
"""
if not lang:
lang = ""
- return (
- """\
+ return ("""\
{lang}
- """
- ).format(lang=lang, code=code)
+ """).format(lang=lang, code=code)
def html_code__macro_confluence(text):
@@ -229,13 +227,11 @@ def html_code__macro_confluence(text):
:param text:
:return:
"""
- return (
- """\
+ return ("""\
- """
- ).format(text=text)
+ """).format(text=text)
def noformat_code_macro_confluence(text, nopanel=None):
@@ -247,14 +243,12 @@ def noformat_code_macro_confluence(text, nopanel=None):
"""
if not nopanel:
nopanel = False
- return (
- """\
+ return ("""\
{nopanel}
- """
- ).format(nopanel=nopanel, text=text)
+ """).format(nopanel=nopanel, text=text)
def symbol_normalizer(text):
diff --git a/examples/confluence/confluence_attach_file.py b/examples/confluence/confluence_attach_file.py
index 0819b0cbe..e7854adfa 100644
--- a/examples/confluence/confluence_attach_file.py
+++ b/examples/confluence/confluence_attach_file.py
@@ -3,6 +3,7 @@
This is example to attach file with mimetype
"""
+
import logging
# https://pypi.org/project/python-magic/
diff --git a/examples/confluence/confluence_scrap_regex_from_page.py b/examples/confluence/confluence_scrap_regex_from_page.py
index 03225875b..f63825b80 100644
--- a/examples/confluence/confluence_scrap_regex_from_page.py
+++ b/examples/confluence/confluence_scrap_regex_from_page.py
@@ -1,6 +1,5 @@
from atlassian import Confluence
-
confluence = Confluence(
url="",
username="",
diff --git a/examples/jira/jira_admins_confluence_page.py b/examples/jira/jira_admins_confluence_page.py
index 5703ad0d0..0232cf1ae 100644
--- a/examples/jira/jira_admins_confluence_page.py
+++ b/examples/jira/jira_admins_confluence_page.py
@@ -12,15 +12,13 @@
confluence = Confluence(url="http://localhost:8090", username="admin", password="admin")
-html = [
- """
+html = ["""
| Project Key |
Project Name |
Leader |
Email |
-
"""
-]
+ """]
for data in jira.project_leaders():
log.info("{project_key} leader is {lead_name} <{lead_email}>".format(**data))
diff --git a/examples/jira/jira_project_administrators.py b/examples/jira/jira_project_administrators.py
index de3af90e8..a25b248dc 100644
--- a/examples/jira/jira_project_administrators.py
+++ b/examples/jira/jira_project_administrators.py
@@ -17,9 +17,7 @@
{project_name} |
{lead_name} |
{lead_email} |
- """.format(
- **data
- )
+ """.format(**data)
html += "
"
diff --git a/examples/jira/jira_project_leaders.py b/examples/jira/jira_project_leaders.py
index 4fdff24a4..709fcc61c 100644
--- a/examples/jira/jira_project_leaders.py
+++ b/examples/jira/jira_project_leaders.py
@@ -7,8 +7,7 @@
jira = Jira(url="http://localhost:8080", username="admin", password="admin")
EMAIL_SUBJECT = quote("Jira access to project {project_key}")
-EMAIL_BODY = quote(
- """I am asking for access to the {project_key} project in Jira.
+EMAIL_BODY = quote("""I am asking for access to the {project_key} project in Jira.
To give me the appropriate permissions, assign me to a role on the page:
http://localhost:8080/plugins/servlet/project-config/{project_key}/roles
@@ -16,8 +15,7 @@
Role:
Users - read-only access + commenting
Developers - work on tasks, editing, etc.
-Admin - Change of configuration and the possibility of starting sprints"""
-)
+Admin - Change of configuration and the possibility of starting sprints""")
MAILTO = '{lead_name}'
diff --git a/tests/test_jira.py b/tests/test_jira.py
index 1edeb0de3..64f7a4c73 100644
--- a/tests/test_jira.py
+++ b/tests/test_jira.py
@@ -1,5 +1,6 @@
# coding: utf8
"""Tests for Jira Modules"""
+
from unittest import TestCase
from atlassian import jira
from .mockup import mockup_server
diff --git a/tests/test_rest_client.py b/tests/test_rest_client.py
index e91d0e81c..8df253d8c 100644
--- a/tests/test_rest_client.py
+++ b/tests/test_rest_client.py
@@ -421,6 +421,7 @@ def fake_sleep(delay):
def test_retry_handler_skips_invalid_header(self, monkeypatch):
"""Ensure invalid Retry-After headers fall back to regular logic."""
+
def fake_sleep(_):
raise AssertionError("sleep should not be called for invalid header")