[mod] py: format

This commit is contained in:
Ivan Gabaldon
2026-09-12 20:29:15 +02:00
parent a0ab3b4f11
commit a1d4e26880
86 changed files with 49 additions and 72 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env python
# SPDX-License-Identifier: AGPL-3.0-or-later
"""WebApp"""
# pylint: disable=use-dict-literal
import json
@@ -118,7 +119,6 @@ from searx.sxng_locales import sxng_locales
import searx.search
from searx.network import stream as http_stream, set_context_network_name
logger = logger.getChild('webapp')
warnings.simplefilter("always")
@@ -1119,17 +1119,13 @@ def stats():
technical_report = []
for error in engine_reliabilities.get(selected_engine_name, {}).get('errors', []):
technical_report.append(
f"\
technical_report.append(f"\
Error: {error['exception_classname'] or error['log_message']} \
Parameters: {error['log_parameters']} \
File name: {error['filename'] }:{ error['line_no'] } \
Error Function: {error['function']} \
Code: {error['code']} \
".replace(
' ' * 12, ''
).strip()
)
".replace(' ' * 12, '').strip())
technical_report = ' '.join(technical_report)
engine_stats['time'] = sorted(engine_stats['time'], reverse=reverse, key=get_key)