diff options
| author | Martin Fischer <martin@push-f.com> | 2022-01-18 16:28:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-18 16:28:32 +0100 |
| commit | 96a1f79c6dcaa08a231ad3a28b8c17b677cddc9c (patch) | |
| tree | 3dbbf7b506b7e704a21b22344a01cb7c8244282d /searx/search/processors/abstract.py | |
| parent | db6f617c0f05b5e29abf176012233025f824cf7d (diff) | |
| parent | 96655cbd4ecc061eaf592f948ae2cac4192850fc (diff) | |
Merge pull request #773 from not-my-profile/typing
More typing
Diffstat (limited to 'searx/search/processors/abstract.py')
| -rw-r--r-- | searx/search/processors/abstract.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/search/processors/abstract.py b/searx/search/processors/abstract.py index 732b55d52..b7703496b 100644 --- a/searx/search/processors/abstract.py +++ b/searx/search/processors/abstract.py @@ -8,6 +8,7 @@ import threading from abc import abstractmethod, ABC from timeit import default_timer +from typing import Dict, Union from searx import settings, logger from searx.engines import engines @@ -17,7 +18,7 @@ from searx.exceptions import SearxEngineAccessDeniedException, SearxEngineRespon from searx.utils import get_engine_from_settings logger = logger.getChild('searx.search.processor') -SUSPENDED_STATUS = {} +SUSPENDED_STATUS: Dict[Union[int, str], 'SuspendedStatus'] = {} class SuspendedStatus: @@ -61,7 +62,7 @@ class EngineProcessor(ABC): __slots__ = 'engine', 'engine_name', 'lock', 'suspended_status', 'logger' - def __init__(self, engine, engine_name): + def __init__(self, engine, engine_name: str): self.engine = engine self.engine_name = engine_name self.logger = engines[engine_name].logger |