[fix] typos / reported by @kianmeng in searx PR-3366

[PR-3366] https://github.com/searx/searx/pull/3366

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2022-09-27 17:01:00 +02:00
parent 94c4cc126b
commit ba8959ad7c
52 changed files with 96 additions and 96 deletions

View file

@ -70,7 +70,7 @@ def run(engine_name_list, verbose):
stderr.write(f'{BOLD_SEQ}Engine {name:30}{RESET_SEQ}Checking\n')
checker = searx.search.checker.Checker(processor)
checker.run()
if checker.test_results.succesfull:
if checker.test_results.successful:
stdout.write(f'{BOLD_SEQ}Engine {name:30}{RESET_SEQ}{GREEN}OK{RESET_SEQ}\n')
if verbose:
stdout.write(f' {"found languages":15}: {" ".join(sorted(list(checker.test_results.languages)))}\n')

View file

@ -107,7 +107,7 @@ def run():
logger.debug('Checking %s engine', name)
checker = Checker(processor)
checker.run()
if checker.test_results.succesfull:
if checker.test_results.successful:
result['engines'][name] = {'success': True}
else:
result['engines'][name] = {'success': False, 'errors': checker.test_results.errors}

View file

@ -174,7 +174,7 @@ class TestResults:
self.languages.add(language)
@property
def succesfull(self):
def successful(self):
return len(self.errors) == 0
def __iter__(self):
@ -317,7 +317,7 @@ class ResultContainerTests:
self._record_error('No result')
def one_title_contains(self, title: str):
"""Check one of the title contains `title` (case insensitive comparaison)"""
"""Check one of the title contains `title` (case insensitive comparison)"""
title = title.lower()
for result in self.result_container.get_ordered_results():
if title in result['title'].lower():

View file

@ -75,7 +75,7 @@ class OnlineProcessor(EngineProcessor):
def _send_http_request(self, params):
# create dictionary which contain all
# informations about the request
# information about the request
request_args = dict(
headers=params['headers'], cookies=params['cookies'], verify=params['verify'], auth=params['auth']
)