diff --git a/atlassian/bitbucket/__init__.py b/atlassian/bitbucket/__init__.py
index 016c2a357..c7f8b3e6f 100644
--- a/atlassian/bitbucket/__init__.py
+++ b/atlassian/bitbucket/__init__.py
@@ -1056,7 +1056,7 @@ def repo_users_with_administrator_permissions(self, project_key, repo_key):
repo_administrators = []
for user in self.repo_users(project_key, repo_key):
if user["permission"] == "REPO_ADMIN":
- repo_administrators.append(user['user'])
+ repo_administrators.append(user["user"])
for group in self.repo_groups_with_administrator_permissions(project_key, repo_key):
for user in self.group_members(group):
repo_administrators.append(user)
diff --git a/atlassian/jira.py b/atlassian/jira.py
index a87beb531..c44239dae 100644
--- a/atlassian/jira.py
+++ b/atlassian/jira.py
@@ -1971,6 +1971,28 @@ def issue_edit_comment(
params: dict = {"notifyUsers": "true" if notify_users else "false"}
return self.put(url, data=data, params=params)
+ def issue_pin_comment(self, issue_key: str, comment_id: T_id) -> T_resp_json:
+ """
+ Pin a comment on a Jira issue
+ :param issue_key: str
+ :param comment_id: int or str
+ :return:
+ """
+ base_url = self.resource_url("issue")
+ url = f"{base_url}/{issue_key}/comment/{comment_id}/pin"
+ return self.put(url, data=True)
+
+ def issue_unpin_comment(self, issue_key: str, comment_id: T_id) -> T_resp_json:
+ """
+ Unpin a comment on a Jira issue
+ :param issue_key: str
+ :param comment_id: int or str
+ :return:
+ """
+ base_url = self.resource_url("issue")
+ url = f"{base_url}/{issue_key}/comment/{comment_id}/pin"
+ return self.put(url, data=False)
+
def scrap_regex_from_issue(self, issue: str, regex: str):
"""
This function scrapes the output of the given regex matches from the issue's description and comments.
diff --git a/atlassian/models/jira/issues.py b/atlassian/models/jira/issues.py
index 9efdf7d3d..1f43b70ec 100644
--- a/atlassian/models/jira/issues.py
+++ b/atlassian/models/jira/issues.py
@@ -5,7 +5,6 @@
from atlassian.models.jira.fields import IssueFields, IssueType
-
_ISSUE_TYPE_REGISTRY: dict[str, type[JiraIssue]] = {}
diff --git a/atlassian/rest_client.py b/atlassian/rest_client.py
index 834cb43d1..388cdea81 100644
--- a/atlassian/rest_client.py
+++ b/atlassian/rest_client.py
@@ -470,7 +470,7 @@ def request(
url += ("&" if params or params_already_in_url else "") + "&".join(flags or [])
json_dump = None
if files is None:
- data = None if not data else dumps(data)
+ data = None if data is None else dumps(data)
json_dump = None if not json else dumps(json)
headers = headers or self.default_headers
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 ("""\
| Project Key | Project Name | Leader | {project_name} | {lead_name} | {lead_email} | - """.format( - **data - ) + """.format(**data) html += "
|---|