mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 19:01:00 +00:00
[mod] introduce searx.engines.Engine for type hinting
This commit is contained in:
parent
3f76c9c96c
commit
d01e8aa8cc
1 changed files with 21 additions and 1 deletions
|
@ -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 = {}
|
||||
|
|
Loading…
Reference in a new issue