diff options
author | Martin Fischer <martin@push-f.com> | 2022-01-04 15:28:05 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2022-01-05 11:03:44 +0100 |
commit | d01e8aa8ccee9b3f1a8705cd4b0c67c012d0b06c (patch) | |
tree | 0ebad4cbce4bca1b46b1782466e6267382296d4a /searx/engines/__init__.py | |
parent | 3f76c9c96c46503f68d8a18380c7ccb812895cf9 (diff) | |
download | searxng-d01e8aa8ccee9b3f1a8705cd4b0c67c012d0b06c.tar.gz searxng-d01e8aa8ccee9b3f1a8705cd4b0c67c012d0b06c.zip |
[mod] introduce searx.engines.Engine for type hinting
Diffstat (limited to 'searx/engines/__init__.py')
-rw-r--r-- | searx/engines/__init__.py | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py index 70f6281a6..7e8336e01 100644 --- a/searx/engines/__init__.py +++ b/searx/engines/__init__.py @@ -13,6 +13,7 @@ usage:: import sys import copy +from typing import List from os.path import realpath, dirname from babel.localedata import locale_identifiers @@ -47,7 +48,26 @@ ENGINE_DEFAULT_ARGS = { # set automatically when an engine does not have any tab category OTHER_CATEGORY = 'other' -"""Defaults for the namespace of an engine module, see :py:func:`load_engine`""" + +class Engine: # pylint: disable=too-few-public-methods + """This class is currently never initialized and only used for type hinting.""" + + name: str + engine: str + shortcut: str + categories: List[str] + supported_languages: List[str] + about: dict + inactive: bool + disabled: bool + language_support: bool + paging: bool + safesearch: bool + time_range_support: bool + timeout: float + + +# Defaults for the namespace of an engine module, see :py:func:`load_engine`` categories = {'general': []} engines = {} |