Separate setup() and module_setup().

This commit is contained in:
erinhmclark
2025-02-10 18:07:47 +00:00
parent 2c3d1f591f
commit e97ccf8a73
14 changed files with 18 additions and 18 deletions

View File

@@ -14,7 +14,7 @@ class BaseModule(ABC):
Base module class. All modules should inherit from this class.
The exact methods a class implements will depend on the type of module it is,
however all modules have a .setup(config: dict) method to run any setup code
however modules can have a .setup() method to run any setup code
(e.g. logging in to a site, spinning up a browser etc.)
See BaseModule.MODULE_TYPES for the types of modules you can create, noting that
@@ -60,7 +60,7 @@ class BaseModule(ABC):
def storages(self) -> list:
return self.config.get('storages', [])
def setup(self, config: dict):
def config_setup(self, config: dict):
authentication = config.get('authentication', {})
# extract out concatenated sites
@@ -80,7 +80,7 @@ class BaseModule(ABC):
for key, val in config.get(self.name, {}).items():
setattr(self, key, val)
def module_setup(self):
def setup(self):
# For any additional setup required by modules, e.g. autehntication
pass