mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 11:40:01 +00:00
- pyright configuration [1]_ - stub files: types-lxml [2]_ - addition of various type hints - enable use of new type system features on older Python versions [3]_ - ``.tool-versions`` - set python to lowest version we support (3.10.18) [4]_: Older versions typically lack some typing features found in newer Python versions. Therefore, for local type checking (before commit), it is necessary to use the older Python interpreter. .. [1] https://docs.basedpyright.com/v1.20.0/configuration/config-files/ .. [2] https://pypi.org/project/types-lxml/ .. [3] https://typing-extensions.readthedocs.io/en/latest/# .. [4] https://mise.jdx.dev/configuration.html#tool-versions Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Format: reST
47 lines
1.2 KiB
Python
47 lines
1.2 KiB
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""The builtin types that are added to the global namespace of a module by the
|
|
intended monkey patching of the engine modules.
|
|
|
|
.. attention::
|
|
|
|
Monkey-patching modules is a practice from the past that shouldn't be
|
|
expanded upon. In the long run, there should be an engine class that can be
|
|
inherited. However, as long as this class doesn't exist, and as long as all
|
|
engine modules aren't converted to an engine class, these builtin types will
|
|
still be needed.
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
import logging
|
|
from searx.enginelib import traits as _traits
|
|
|
|
logger: logging.Logger
|
|
supported_languages: str
|
|
language_aliases: str
|
|
language_support: bool
|
|
traits: _traits.EngineTraits
|
|
|
|
# from searx.engines.ENGINE_DEFAULT_ARGS
|
|
about: dict[str, dict[str, str | None | bool]]
|
|
categories: list[str]
|
|
disabled: bool
|
|
display_error_messages: bool
|
|
enable_http: bool
|
|
engine_type: str
|
|
inactive: bool
|
|
max_page: int
|
|
paging: int
|
|
safesearch: int
|
|
send_accept_language_header: bool
|
|
shortcut: str
|
|
time_range_support: int
|
|
timeout: int
|
|
tokens: list[str]
|
|
using_tor_proxy: bool
|
|
|
|
# from searx.engines.check_engine_module
|
|
network: str
|
|
|
|
# from searx.engines.update_attributes_for_tor
|
|
search_url: str
|