mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[mod] addition of various type hints / engine processors
Continuation of #5147 .. typification of the engine processors. BTW: - removed obsolete engine property https_support - fixed & improved currency_convert - engine instances can now implement a engine.setup method [#5147] https://github.com/searxng/searxng/pull/5147 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
committed by
Markus Heiser
parent
23257bddce
commit
8f8343dc0d
@@ -74,9 +74,9 @@ class SearxEngineAccessDeniedException(SearxEngineResponseException):
|
||||
"""
|
||||
if suspended_time is None:
|
||||
suspended_time = self._get_default_suspended_time()
|
||||
super().__init__(message + ', suspended_time=' + str(suspended_time))
|
||||
self.message: str = f"{message} (suspended_time={suspended_time})"
|
||||
self.suspended_time: int = suspended_time
|
||||
self.message: str = message
|
||||
super().__init__(self.message)
|
||||
|
||||
def _get_default_suspended_time(self) -> int:
|
||||
from searx import get_setting # pylint: disable=C0415
|
||||
|
||||
Reference in New Issue
Block a user