diff --git a/searx/answerers/_core.py b/searx/answerers/_core.py index 9c50d026e..f4b1e00eb 100644 --- a/searx/answerers/_core.py +++ b/searx/answerers/_core.py @@ -21,7 +21,7 @@ log: logging.Logger = logging.getLogger("searx.answerers") @dataclass class AnswererInfo: - """Object that holds informations about an answerer, these infos are shown + """Object that holds information about an answerer, these infos are shown to the user in the Preferences menu. To be able to translate the information into other languages, the text must @@ -53,7 +53,7 @@ class Answerer(abc.ABC): @abc.abstractmethod def info(self) -> AnswererInfo: - """Informations about the *answerer*, see :py:obj:`AnswererInfo`.""" + """Information about the *answerer*, see :py:obj:`AnswererInfo`.""" class ModuleAnswerer(Answerer): diff --git a/searx/botdetection/config.py b/searx/botdetection/config.py index 274be77df..5b73afe1c 100644 --- a/searx/botdetection/config.py +++ b/searx/botdetection/config.py @@ -319,9 +319,9 @@ def dict_deepupdate(base_dict: dict, upd_dict: dict, names=None): """ # pylint: disable=too-many-branches if not isinstance(base_dict, dict): - raise TypeError("argument 'base_dict' is not a ditionary type") + raise TypeError("argument 'base_dict' is not a dictionary type") if not isinstance(upd_dict, dict): - raise TypeError("argument 'upd_dict' is not a ditionary type") + raise TypeError("argument 'upd_dict' is not a dictionary type") if names is None: names = [] diff --git a/searx/cache.py b/searx/cache.py index ea6c17be9..96644419b 100644 --- a/searx/cache.py +++ b/searx/cache.py @@ -42,7 +42,7 @@ class ExpireCacheCfg(msgspec.Struct): # pylint: disable=too-few-public-methods DB will be created in `/tmp/sxng_cache_{self.name}.db`""" MAX_VALUE_LEN: int = 1024 * 10 - """Max lenght of a *serialized* value.""" + """Max length of a *serialized* value.""" MAXHOLD_TIME: int = 60 * 60 * 24 * 7 # 7 days """Hold time (default in sec.), after which a value is removed from the cache.""" @@ -80,7 +80,7 @@ class ExpireCacheCfg(msgspec.Struct): # pylint: disable=too-few-public-methods @dataclasses.dataclass class ExpireCacheStats: - """Dataclass wich provides information on the status of the cache.""" + """Dataclass which provides information on the status of the cache.""" cached_items: dict[str, list[tuple[str, typing.Any, int]]] """Values in the cache mapped by context name. diff --git a/searx/enginelib/__init__.py b/searx/enginelib/__init__.py index 0435b14e1..9cb49c0cd 100644 --- a/searx/enginelib/__init__.py +++ b/searx/enginelib/__init__.py @@ -79,7 +79,7 @@ class EngineCache: `). In the :origin:`searx/engines/demo_offline.py` engine you can find an - exemplary implementation of such a cache other exaples are implemeted + exemplary implementation of such a cache other examples are implemented in: - :origin:`searx/engines/radio_browser.py` diff --git a/searx/engines/adobe_stock.py b/searx/engines/adobe_stock.py index 775e5d107..4ab4312a1 100644 --- a/searx/engines/adobe_stock.py +++ b/searx/engines/adobe_stock.py @@ -156,7 +156,7 @@ def parse_image_item(item): def parse_video_item(item): # in video items, the title is more or less a "content description", we try - # to reduce the lenght of the title .. + # to reduce the length of the title .. title = item["title"] content = "" diff --git a/searx/engines/tagesschau.py b/searx/engines/tagesschau.py index 58bd40e56..aa3df6f06 100644 --- a/searx/engines/tagesschau.py +++ b/searx/engines/tagesschau.py @@ -77,7 +77,7 @@ def response(resp): elif item_type == 'video': results.append(_video(item)) else: - logger.error("unknow result type: %s", item_type) + logger.error("unknown result type: %s", item_type) return results diff --git a/searx/extended_types.py b/searx/extended_types.py index 41e3a56a9..e5c824a9c 100644 --- a/searx/extended_types.py +++ b/searx/extended_types.py @@ -42,7 +42,7 @@ class SXNG_Request(flask.Request): """list of searx.plugins.Plugin.id (the id of the plugins)""" preferences: "searx.preferences.Preferences" - """The prefernces of the request.""" + """The preferences of the request.""" errors: list[str] """A list of errors (translated text) added by :py:obj:`searx.webapp` in diff --git a/searx/favicons/cache.py b/searx/favicons/cache.py index cf71705aa..24daac457 100644 --- a/searx/favicons/cache.py +++ b/searx/favicons/cache.py @@ -140,7 +140,7 @@ class FaviconCacheConfig(msgspec.Struct): # pylint: disable=too-few-public-meth @dataclasses.dataclass class FaviconCacheStats: - """Dataclass wich provides information on the status of the cache.""" + """Dataclass which provides information on the status of the cache.""" favicons: int | None = None bytes: int | None = None @@ -387,7 +387,7 @@ CREATE TABLE IF NOT EXISTS blob_map ( self.properties.set("LAST_MAINTENANCE", "") # hint: this (also) sets the m_time of the property! # Do maintenance tasks. This can be take a little more time, to avoid - # DB locks, etablish a new DB connecton. + # DB locks, establish a new DB connection. with self.connect() as conn: diff --git a/searx/openmetrics.py b/searx/openmetrics.py index 2cc89839b..a9ea01e08 100644 --- a/searx/openmetrics.py +++ b/searx/openmetrics.py @@ -8,7 +8,7 @@ class OpenMetricsFamily: # pylint: disable=too-few-public-methods The type_hint parameter must be one of 'counter', 'gauge', 'histogram', 'summary'. The help_hint parameter is a short string explaining the metric. The data_info parameter is a dictionary of descriptionary parameters for the data point (e.g. request method/path). - The data parameter is a flat list of the actual data in shape of a primive type. + The data parameter is a flat list of the actual data in shape of a primitive type. See https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md for more information. """ diff --git a/searx/plugins/_core.py b/searx/plugins/_core.py index f5ae56e15..bb1f813d3 100644 --- a/searx/plugins/_core.py +++ b/searx/plugins/_core.py @@ -26,7 +26,7 @@ log: logging.Logger = logging.getLogger("searx.plugins") @dataclass class PluginInfo: - """Object that holds informations about a *plugin*, these infos are shown to + """Object that holds information about a *plugin*, these infos are shown to the user in the Preferences menu. To be able to translate the information into other languages, the text must @@ -85,7 +85,7 @@ class Plugin(abc.ABC): constructor (if not already set in the subclass).""" info: PluginInfo - """Informations about the *plugin*, see :py:obj:`PluginInfo`.""" + """Information about the *plugin*, see :py:obj:`PluginInfo`.""" fqn: str = "" @@ -129,8 +129,8 @@ class Plugin(abc.ABC): def init(self, app: "flask.Flask") -> bool: # pylint: disable=unused-argument """Initialization of the plugin, the return value decides whether this plugin is active or not. Initialization only takes place once, at the - time the WEB application is set up. The base methode always returns - ``True``, the methode can be overwritten in the inheritances, + time the WEB application is set up. The base method always returns + ``True``, the method can be overwritten in the inheritances, - ``True`` plugin is active - ``False`` plugin is inactive diff --git a/searx/sqlitedb.py b/searx/sqlitedb.py index 364b43db3..95466eac9 100644 --- a/searx/sqlitedb.py +++ b/searx/sqlitedb.py @@ -114,7 +114,7 @@ class SQLiteAppl(abc.ABC): """ SQLITE_JOURNAL_MODE = "WAL" - """``SQLiteAppl`` applications are optimzed for WAL_ mode, its not recommend + """``SQLiteAppl`` applications are optimized for WAL_ mode, its not recommend to change the journal mode (see :py:obj:`SQLiteAppl.tear_down`). .. _WAL: https://sqlite.org/wal.html @@ -145,7 +145,7 @@ class SQLiteAppl(abc.ABC): - https://github.com/python/cpython/issues/118172 - https://github.com/python/cpython/issues/123873 - The workaround for SQLite3 multithreading cache inconsistency ist to set + The workaround for SQLite3 multithreading cache inconsistency is to set option ``cached_statements`` to ``0`` by default. """ diff --git a/utils/lib.sh b/utils/lib.sh index d3d515c0a..1ef273535 100755 --- a/utils/lib.sh +++ b/utils/lib.sh @@ -1276,7 +1276,7 @@ uWSGI_distro_setup() { # Fedora runs uWSGI in emperor-tyrant mode: in Tyrant mode the # Emperor will run the vassal using the UID/GID of the vassal # configuration file [1] (user and group of the app .ini file). - # There are some quirks abbout additional POSIX groups in uWSGI + # There are some quirks about additional POSIX groups in uWSGI # 2.0.x, read at least: https://github.com/unbit/uwsgi/issues/2099 uWSGI_APPS_AVAILABLE="${uWSGI_SETUP}/apps-available" uWSGI_APPS_ENABLED="${uWSGI_SETUP}.d"