Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Weves authored and rajiv chodisetti committed Oct 2, 2024
1 parent 45a3a90 commit d4cd331
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions backend/danswer/connectors/danswer_jira/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ def _get_comment_strs(
comment_strs = []
for comment in jira.fields.comment.comments:
try:
body_text = (comment.body if JIRA_API_VERSION == "2"
else extract_text_from_adf(comment.raw["body"]))
body_text = (
comment.body
if JIRA_API_VERSION == "2"
else extract_text_from_adf(comment.raw["body"])
)

if (
hasattr(comment, "author")
Expand Down Expand Up @@ -125,8 +128,11 @@ def fetch_jira_issues_batch(
)
continue

description = (jira.fields.description if JIRA_API_VERSION == "2"
else extract_text_from_adf(jira.raw["fields"]["description"]))
description = (
jira.fields.description
if JIRA_API_VERSION == "2"
else extract_text_from_adf(jira.raw["fields"]["description"])
)
comments = _get_comment_strs(jira, comment_email_blacklist)
semantic_rep = f"{description}\n" + "\n".join(
[f"Comment: {comment}" for comment in comments if comment]
Expand Down

0 comments on commit d4cd331

Please sign in to comment.