Skip to content

Commit

Permalink
formatting: lint cleanup
Browse files Browse the repository at this point in the history
The undefined variable name was particularly bad. Guess nobody uses the
single feature that relies on the broken function.
  • Loading branch information
dgw committed May 2, 2022
1 parent bb66e62 commit 4443ec4
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 4443ec4

Please sign in to comment.