From 2ffd446e5c0be30717d9ff112d34ef606f08fcdd Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 24 Jul 2022 09:32:05 +0200 Subject: [mod] clarify the difference of the default category and subgrouping This PR does no functional change it is just an attempt to make more clear in the code, what a default category is and what a subcategory is. The previous name 'others' leads to confusion with the **category 'other'**. If a engine is not assigned to a category, the default is assigned:: DEFAULT_CATEGORY = 'other' If an engine has only one category and this category is shown as tab in the user interface, this engine has no further subgrouping:: NO_SUBGROUPING = 'without further subgrouping' Related: - https://github.com/searxng/searxng/issues/1604 - https://github.com/searxng/searxng/pull/1545 Signed-off-by: Markus Heiser --- searx/engines/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'searx/engines/__init__.py') diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py index c8e8e7241..c9026f96d 100644 --- a/searx/engines/__init__.py +++ b/searx/engines/__init__.py @@ -45,7 +45,7 @@ ENGINE_DEFAULT_ARGS = { "about": {}, } # set automatically when an engine does not have any tab category -OTHER_CATEGORY = 'other' +DEFAULT_CATEGORY = 'other' # Defaults for the namespace of an engine module, see :py:func:`load_engine` @@ -132,7 +132,7 @@ def load_engine(engine_data: dict) -> Optional[Engine]: set_loggers(engine, engine_name) if not any(cat in settings['categories_as_tabs'] for cat in engine.categories): - engine.categories.append(OTHER_CATEGORY) + engine.categories.append(DEFAULT_CATEGORY) return engine -- cgit v1.2.3