You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/10/16 21:30:14 UTC
[incubator-ponymail-foal] 02/02: PEP8 linting
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 02011598890804d60e55f9e8c5d54c801392ba1a
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sat Oct 16 23:30:01 2021 +0200
PEP8 linting
---
server/plugins/defuzzer.py | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/server/plugins/defuzzer.py b/server/plugins/defuzzer.py
index b6bce82..846fdeb 100644
--- a/server/plugins/defuzzer.py
+++ b/server/plugins/defuzzer.py
@@ -90,7 +90,9 @@ def defuzz(formdata: dict, nodate: bool = False, list_override: typing.Optional[
listname, fqdn = list_override.split("@", 1)
assert fqdn, "You must specify a domain part of the mailing list(s) to search, or * for wildcard search."
assert listname, "You must specify a list part of the mailing list(s) to search, or * for wildcard search."
- assert '@' not in listname, "The list component of the List ID(s) cannot contain @, please use both list and domain keywords for searching."
+ assert (
+ "@" not in listname
+ ), "The list component of the List ID(s) cannot contain @, please use both list and domain keywords for searching."
list_raw = "<%s.%s>" % (listname, fqdn)
# Default is to look in a specific list
@@ -145,18 +147,15 @@ def defuzz(formdata: dict, nodate: bool = False, list_override: typing.Optional[
xshould.append(
{
"bool": {
- "should":
- [
- {
- "multi_match": {
- "fields": ["from", "body", "subject"],
- "query": x,
- "type": "phrase"
- },
+ "should": [
+ {
+ "multi_match": {
+ "fields": ["from", "body", "subject"],
+ "query": x,
+ "type": "phrase",
},
-
- ]
-
+ },
+ ]
}
}
)