searxng/searx
Markus Heiser 86b4d2f2d0 [mod] activate pyright checks (in CI)
We have been using a static type checker (pyright) for a long time, but its
check was not yet a prerequisite for passing the quality gate.  It was checked
in the CI, but the error messages were only logged.

As is always the case in life, with checks that you have to do but which have no
consequences; you neglect them :-)

We didn't activate the checks back then because we (even today) have too much
monkey patching in our code (not only in the engines, httpx and others objects
are also affected).

We want to replace monkey patching with clear interfaces for a long time, the
basis for this is increased typing and we can only achieve this if we make type
checking an integral part of the quality gate.

  This PR activates the type check; in order to pass the check, a few typings
  were corrected in the code, but most type inconsistencies were deactivated via
  inline comments.

This was particularly necessary in places where the code uses properties that
stick to the objects (monkey patching).  The sticking of properties only happens
in a few places, but the access to these properties extends over the entire
code, which is why there are many `# type: ignore` markers in the code ... which
we will hopefully be able to remove again successively in the future.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-27 18:31:52 +02:00
..
answerers [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
botdetection [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
data [data] wikidata: update wikidata_units.json 2024-04-27 18:11:33 +02:00
enginelib [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
engines [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
infopage [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
metrics [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
network [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
plugins [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
search [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
static [build] /static 2024-04-27 18:26:23 +02:00
templates/simple [feat] preferences: button to enable/disable all engines 2024-04-27 18:26:23 +02:00
translations [l10n] update translations from Weblate 2024-04-26 09:14:03 +02:00
__init__.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
autocomplete.py [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
babel_extract.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
exceptions.py [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
external_bang.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
external_urls.py [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
flaskfix.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
limiter.py [fix] even if limiter not activated, botdetection must be activated 2024-04-08 07:53:04 +02:00
limiter.toml [mod] isolation of botdetection from the limiter 2023-11-01 06:44:56 +01:00
locales.py [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
preferences.py [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
query.py [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
redisdb.py [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
redislib.py [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
results.py [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
searxng.msg [fix] add missing localizable (gettext) messages to searxng.msg 2024-04-26 07:34:32 +02:00
settings.yml [feat] media.ccc.de: implement module with pagination and iframe 2024-04-27 08:55:26 +02:00
settings_defaults.py [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
settings_loader.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
sxng_locales.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
unixthreadname.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
utils.py [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
version.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00
webadapter.py [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
webapp.py [mod] activate pyright checks (in CI) 2024-04-27 18:31:52 +02:00
webutils.py [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION 2024-03-11 14:55:38 +01:00