Skip to content

Commit

Permalink
Blackened is the end
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardobranco777 committed Feb 25, 2024
1 parent b0ab857 commit 41b4db0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions bugme.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,11 @@ def print_issue(
"""
if output_type == "html":
info = {
field: html.escape(issue[field])
if isinstance(issue[field], str)
else issue[field]
field: (
html.escape(issue[field])
if isinstance(issue[field], str)
else issue[field]
)
for field in fields
}
info["tag"] = html_tag("a", issue.tag, href=issue.url)
Expand Down
8 changes: 5 additions & 3 deletions services/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ def _to_issue(self, info: Any) -> Issue:
return Issue(
tag=f"{self.tag}#{info['key']}",
url=f"{self.url}/browse/{info['key']}",
assignee=info["fields"]["assignee"]["name"]
if info["fields"].get("assignee")
else "none",
assignee=(
info["fields"]["assignee"]["name"]
if info["fields"].get("assignee")
else "none"
),
creator=info["fields"]["creator"]["name"],
created=utc_date(info["fields"]["created"]),
updated=utc_date(info["fields"]["updated"]),
Expand Down
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def utc_date(date: str | datetime | None) -> datetime:
if date is None:
return datetime.max.replace(tzinfo=utc)
if "DateTime" in str(date.__class__): # xmlrpc DateTime object
date = datetime.strptime(str(date), '%Y%m%dT%H:%M:%S')
date = datetime.strptime(str(date), "%Y%m%dT%H:%M:%S")
date = date.isoformat() + "Z"
if isinstance(date, str):
if date.isdigit():
Expand Down

0 comments on commit 41b4db0

Please sign in to comment.