diff options
Diffstat (limited to 'searx/plugins')
| -rw-r--r-- | searx/plugins/__init__.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/searx/plugins/__init__.py b/searx/plugins/__init__.py index 7815c2099..6c1bea8d0 100644 --- a/searx/plugins/__init__.py +++ b/searx/plugins/__init__.py @@ -10,10 +10,20 @@ from os.path import abspath, basename, dirname, exists, join from shutil import copyfile from pkgutil import iter_modules from logging import getLogger +from typing import List from searx import logger, settings +class Plugin: # pylint: disable=too-few-public-methods + """This class is currently never initialized and only used for type hinting.""" + + id: str + name: str + description: str + default_on: bool + + logger = logger.getChild("plugins") required_attrs = ( @@ -175,7 +185,7 @@ def load_and_initialize_plugin(plugin_module_name, external, init_args): class PluginStore: def __init__(self): - self.plugins = [] + self.plugins: List[Plugin] = [] def __iter__(self): for plugin in self.plugins: |