[fix] issues reported by pylint-3.2.2

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2024-05-28 17:56:54 +02:00 committed by Markus Heiser
parent e03c7e4dcd
commit c19bffde4d
3 changed files with 19 additions and 6 deletions

View file

@ -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: