summaryrefslogtreecommitdiff
path: root/searx/engines/__builtins__.pyi
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2025-07-31 13:45:16 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2025-08-19 12:04:35 +0200
commit25647c20d1904840d089892bb118390f46c66984 (patch)
treea2db511a7444ea0504dbe83d484a556003d57e9b /searx/engines/__builtins__.pyi
parent9bb04e288ddda7d91fd6e2d87adc3bdaf01bd7c8 (diff)
[mod] switching from pyright to basedpyright (plus first rules)
pyrightconfig.json : for the paths searx, searxng_extra and tests, individual rules were defined (for example, in test fewer / different rules are needed than in the searx package searx/engines/__builtins__.pyi : The builtin types that are added to the global namespace of a module by the intended monkey patching of the engine modules / replaces the previous filtering of the stdout using grep. test.pyright_modified (utils/lib_sxng_test.sh) : static type check of local modified files not yet commited make test : prerequisite 'test.pyright' has been replaced by 'test.pyright_modified' searx/engines/__init__.py, searx/enginelib/__init__.py : First, minimal typifications that were considered necessary.
Diffstat (limited to 'searx/engines/__builtins__.pyi')
-rw-r--r--searx/engines/__builtins__.pyi43
1 files changed, 43 insertions, 0 deletions
diff --git a/searx/engines/__builtins__.pyi b/searx/engines/__builtins__.pyi
new file mode 100644
index 000000000..c9c328b0c
--- /dev/null
+++ b/searx/engines/__builtins__.pyi
@@ -0,0 +1,43 @@
+# 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
+
+logger: logging.Logger
+supported_languages: str
+language_aliases: str
+
+# 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