summaryrefslogtreecommitdiff
path: root/searx/infopage/__init__.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2024-05-28 17:56:54 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2024-05-28 18:10:04 +0200
commitc19bffde4df5c879d11ec7ea97b4fa30a07db992 (patch)
treeb1900d856a789e2a6584da8721b632b5d4f70e53 /searx/infopage/__init__.py
parente03c7e4dcdffd39b2ec95f7770d5976e9571eef0 (diff)
downloadsearxng-c19bffde4df5c879d11ec7ea97b4fa30a07db992.tar.gz
searxng-c19bffde4df5c879d11ec7ea97b4fa30a07db992.zip
[fix] issues reported by pylint-3.2.2
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/infopage/__init__.py')
-rw-r--r--searx/infopage/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/searx/infopage/__init__.py b/searx/infopage/__init__.py
index 3f9426beb..1d556d6d2 100644
--- a/searx/infopage/__init__.py
+++ b/searx/infopage/__init__.py
@@ -17,6 +17,8 @@ Usage in a Flask app route:
"""
+from __future__ import annotations
+
__all__ = ['InfoPage', 'InfoPageSet']
import os
@@ -37,6 +39,16 @@ from ..locales import LOCALE_NAMES
logger = logging.getLogger('searx.infopage')
_INFO_FOLDER = os.path.abspath(os.path.dirname(__file__))
+INFO_PAGES: 'InfoPageSet'
+
+
+def __getattr__(name):
+ if name == 'INFO_PAGES':
+ global INFO_PAGES # pylint: disable=global-statement
+ INFO_PAGES = InfoPageSet()
+ return INFO_PAGES
+
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
class InfoPage: