diff options
| author | Martin Fischer <martin@push-f.com> | 2022-01-07 09:45:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-07 09:45:23 +0100 |
| commit | e12525a1fabef37dbaf5e75bc143787ba626b43f (patch) | |
| tree | 963ca5ae8188342b7a178cc0d96d9c0311f38050 /searx/plugins | |
| parent | a583d09582a49d552c3dd1259f78c1c56427bb89 (diff) | |
| parent | 180d4d068b4c629ab99876b55046f98455b88149 (diff) | |
Merge pull request #708 from not-my-profile/pref-refactor
Refactor `preferences`
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: |