Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formatting: lint cleanup #107

Merged
merged 1 commit into from
May 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sopel_modules/github/formatting.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# coding=utf8
# coding=utf-8
"""
formatting.py - Sopel GitHub Module
Copyright 2015 Max Gurela
Expand Down Expand Up @@ -527,7 +527,7 @@ def fmt_gollum_summary_message(payload=None):
fmt_arr_to_sentence(actions.sort()))


def fmt_arr_to_sentence(array):
def fmt_arr_to_sentence(seq):
if len(seq) <= 2:
return ' and '.join(seq)
else:
Expand Down Expand Up @@ -605,7 +605,7 @@ def get_formatted_response(payload, row):
messages.append(fmt_issue_label_message() + " " + fmt_url(shorten_url(payload['pull_request']['html_url'])))
elif payload['event'] == 'pull_request_review':
if payload['action'] == 'submitted' and payload['review']['state'] in ['approved', 'changes_requested', 'commented']:
if payload['review']['state'] == 'commented' and payload['review']['body'] == None:
if payload['review']['state'] == 'commented' and payload['review']['body'] is None:
# Probably an empty "review" fired by a pull_request_review_comment reply, which we'll get in a separate hook delivery.
# Wish GitHub didn't fire both events, but they do, even though it makes no sense.
# Either way, an empty review must be accompanied by comments, which will get handled when their hook(s) fire(s).
Expand Down