Skip to content

Commit

Permalink
Remove empty lines
Browse files Browse the repository at this point in the history
  • Loading branch information
gonchik committed Feb 8, 2023
1 parent 127ddde commit 92bbc63
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 19 deletions.
12 changes: 0 additions & 12 deletions atlassian/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ def html_list(data):
</ul>'
"""
html = "<ul>"

for item in data:

if isinstance(item, dict):
if item.get("email"):
item = html_email(item.get("email"), item.get("name", None))
Expand All @@ -51,9 +49,7 @@ def html_list(data):

if is_email(item):
item = html_email(item, item)

html += "<li>{}</li>".format(item)

return html + "</ul>"


Expand All @@ -65,11 +61,9 @@ def html_table_header_row(data):
'\\n\\t<tr><th>Key</th><th>Project</th><th>Leader</th><th>Administrators</th></tr>'
"""
html = "\n\t<tr>"

for th in data:
title = th.replace("_", " ").title()
html += "<th>{}</th>".format(title)

return html + "</tr>"


Expand All @@ -94,20 +88,16 @@ def html_row_with_ordered_headers(data, col_headers, row_header=None):
</ul></td></tr>'
"""
html = "\n\t<tr>"

if row_header:
html += "<th>{}</th>".format(row_header.replace("_", " ").title())
for header in col_headers:
element = data[header]

if isinstance(element, list):
element = html_list(element)

if is_email(element):
element = html_email(element)

html += "<td>{}</td>".format(element)

return html + "</tr>"


Expand Down Expand Up @@ -165,10 +155,8 @@ def html_table_from_dict(data, ordering):
"""
html = "<table><tbody>"
html += html_table_header_row(ordering)

for row in data:
html += html_row_with_ordered_headers(row, ordering)

return html + "\n</tbody></table>"


Expand Down
1 change: 0 additions & 1 deletion examples/jira/jira_issue_type_counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
category = input()

for i in issue_types:

issue_type = i["name"]
jql_all = 'issuetype = "{0}"'.format(issue_type)
number = jira.jql(jql_all)["total"]
Expand Down
3 changes: 0 additions & 3 deletions examples/jira/jira_notification_schemes_duplicates.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@ def review():
names = []

for notification_schemes_id in notification_schemes_ids["values"]:

notification_id = notification_schemes_id["id"]
notification_schemes = jira.get_notification_scheme(notification_id, "all")
names.append(notification_schemes["name"])
notification_scheme_dict = {}

for scheme in notification_schemes["notificationSchemeEvents"]:
notification_types = []

for notificationType in scheme["notifications"]:
notification_types.append(notificationType["notificationType"])
notification_scheme_dict[scheme["event"]["name"]] = notification_types
Expand Down
4 changes: 1 addition & 3 deletions examples/jira/jira_review_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def get_all_users(group, include_inactive=True):
"""
Get all users for group. If there more, than 50 users in group:
Get all users for group. If their more, than 50 users in group:
go through the pages and append other users to the list
:param group:
:param include_inactive:
Expand Down Expand Up @@ -97,9 +97,7 @@ def find_group(groups, group_name):
:return:
"""
for group in groups:

if group["group_name"] == group_name:

return group
else:
return "Group {} not in list".format(group_name)

0 comments on commit 92bbc63

Please sign in to comment.