Skip to content

Commit

Permalink
Conform to line length reqs, trim whitespace lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Spevacus committed May 12, 2021
1 parent 72b9cd9 commit 5adc4f1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions chatcommands.py
Expand Up @@ -364,7 +364,7 @@ def do_blacklist(blacklist_type, msg, force=False):
has_u202d = (
"The pattern contains an invisible U+202D whitespace character;"
" - in most cases, you don't want that")

has_leading_whitespace = ""
if regex.search(r"^\s+", pattern):
has_leading_whitespace = (
Expand Down Expand Up @@ -405,11 +405,13 @@ def do_blacklist(blacklist_type, msg, force=False):
if reasons:
has_u202d = "; in addition, " + has_u202d.lower() if has_u202d else ""
has_unescaped_dot = "; in addition, " + has_unescaped_dot.lower() if has_unescaped_dot else ""
has_leading_whitespace = "; in addition, " + has_leading_whitespace.lower() if has_leading_whitespace else ""
has_leading_whitespace = (
"; in addition, " + has_leading_whitespace.lower()) if has_leading_whitespace else ""
raise CmdException(
"That pattern looks like it's already caught by " +
format_blacklist_reasons(reasons) + has_unescaped_dot + has_u202d + has_leading_whitespace + append_force_to_do)

format_blacklist_reasons(reasons) + has_unescaped_dot + has_u202d +
has_leading_whitespace + append_force_to_do)

if has_leading_whitespace:
raise CmdException(has_leading_whitespace + has_unescaped_dot + has_u202d + append_force_to_do)

Expand Down

0 comments on commit 5adc4f1

Please sign in to comment.