From fad64ff06481ad8b90cb894b65f7a6e222b2bcf7 Mon Sep 17 00:00:00 2001 From: Renaud Boyer Date: Sun, 6 Dec 2020 18:00:41 +0100 Subject: [PATCH] linting --- app/spamassassin_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/spamassassin_utils.py b/app/spamassassin_utils.py index 4211ee35..11c93332 100644 --- a/app/spamassassin_utils.py +++ b/app/spamassassin_utils.py @@ -74,7 +74,7 @@ class SpamAssassin(object): first_line = match.group(1) headers = match.group(2) - body = response[match.end(0) :] + body = response[match.end(0):] # Checking response is good match = first_line_pattern.match(first_line) @@ -87,7 +87,7 @@ class SpamAssassin(object): s.strip() for s in body.decode("utf-8", errors="ignore").strip().split("\n") ] linebreak_num = report_list.index([s for s in report_list if "---" in s][0]) - tablelists = [s for s in report_list[linebreak_num + 1 :]] + tablelists = [s for s in report_list[linebreak_num + 1:]] self.report_fulltext = "\n".join(report_list) @@ -108,7 +108,7 @@ class SpamAssassin(object): # create final json self.report_json = dict() for tablelist in tablelists: - wordlist = re.split("\s+", tablelist) + wordlist = re.split(r"\s+", tablelist) try: self.report_json[wordlist[1]] = { "partscore": float(wordlist[0]),