From fcdc2c2cd26e24c2aa3f064d93cee3e29dc2a30c Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Mon, 27 Dec 2021 09:16:03 +0100 Subject: [format.python] disable py code formatting for some hunks of code Disable the python code formatting from python-black, where the readability of code suffers by formatting. Signed-off-by: Markus Heiser --- searx/engines/wikidata.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'searx/engines/wikidata.py') diff --git a/searx/engines/wikidata.py b/searx/engines/wikidata.py index f0dfc7595..59413499c 100644 --- a/searx/engines/wikidata.py +++ b/searx/engines/wikidata.py @@ -92,14 +92,20 @@ WHERE { # https://www.w3.org/TR/sparql11-query/#rSTRING_LITERAL1 # https://lists.w3.org/Archives/Public/public-rdf-dawg/2011OctDec/0175.html -sparql_string_escape = get_string_replaces_function({'\t': '\\\t', - '\n': '\\\n', - '\r': '\\\r', - '\b': '\\\b', - '\f': '\\\f', - '\"': '\\\"', - '\'': '\\\'', - '\\': '\\\\'}) +sparql_string_escape = get_string_replaces_function( + # fmt: off + { + '\t': '\\\t', + '\n': '\\\n', + '\r': '\\\r', + '\b': '\\\b', + '\f': '\\\f', + '\"': '\\\"', + '\'': '\\\'', + '\\': '\\\\' + } + # fmt: on +) replace_http_by_https = get_string_replaces_function({'http:': 'https:'}) -- cgit v1.2.3