diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2024-05-28 17:56:54 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2024-05-28 18:10:04 +0200 |
commit | c19bffde4df5c879d11ec7ea97b4fa30a07db992 (patch) | |
tree | b1900d856a789e2a6584da8721b632b5d4f70e53 /searx/infopage | |
parent | e03c7e4dcdffd39b2ec95f7770d5976e9571eef0 (diff) | |
download | searxng-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')
-rw-r--r-- | searx/infopage/__init__.py | 12 |
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: |