Skip to content

Commit

Permalink
Merge pull request #107 from sopel-irc/lint-fixes
Browse files Browse the repository at this point in the history
formatting: lint cleanup
  • Loading branch information
dgw authored May 9, 2022
2 parents 04f81c9 + 4443ec4 commit 42f5fbc
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 @@ -534,7 +534,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 @@ -612,7 +612,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 42f5fbc

Please sign in to comment.