[mod] make format.python : prepare python code for black 23.1.0

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2023-02-04 17:58:53 +01:00
parent 233ee1bb15
commit b4c80d9ebb
68 changed files with 8 additions and 115 deletions

View file

@ -179,7 +179,6 @@ def get_engines_stats(engine_name_list):
max_time_total = max_result_count = None
for engine_name in engine_name_list:
sent_count = counter('engine', engine_name, 'search', 'count', 'sent')
if sent_count == 0:
continue
@ -218,7 +217,6 @@ def get_engines_stats(engine_name_list):
time_http_p80 = time_http_p95 = 0
if time_http is not None:
time_http_p80 = histogram('engine', engine_name, 'time', 'http').percentage(80)
time_http_p95 = histogram('engine', engine_name, 'time', 'http').percentage(95)
@ -227,7 +225,6 @@ def get_engines_stats(engine_name_list):
stats['http_p95'] = round(time_http_p95, 1)
if time_total is not None:
time_total_p80 = histogram('engine', engine_name, 'time', 'total').percentage(80)
time_total_p95 = histogram('engine', engine_name, 'time', 'total').percentage(95)

View file

@ -17,7 +17,6 @@ errors_per_engines = {}
class ErrorContext:
__slots__ = (
'filename',
'function',

View file

@ -12,7 +12,6 @@ logger = logger.getChild('searx.metrics')
class Histogram:
_slots__ = '_lock', '_size', '_sum', '_quartiles', '_count', '_width'
def __init__(self, width=10, size=200):
@ -101,7 +100,6 @@ class Histogram:
class HistogramStorage:
__slots__ = 'measures', 'histogram_class'
def __init__(self, histogram_class=Histogram):
@ -127,7 +125,6 @@ class HistogramStorage:
class CounterStorage:
__slots__ = 'counters', 'lock'
def __init__(self):