# Path: marvinbot/defaults.py
# DEFAULT_PRIORITY = 2
# 
# Path: marvinbot/errors.py
# class PluginLoadException(Exception):
#     pass
# 
# Path: marvinbot/signals.py



from flask import Blueprint
from marvinbot.defaults import DEFAULT_PRIORITY
from marvinbot.errors import PluginLoadException
from marvinbot.signals import plugin_loaded
from urllib.parse import quote_plus
import importlib
import logging
        self.enabled = enabled

    def get_default_config(self) -> dict:
        """Returns a dict with the default config for the plugin.

        Subclasses can override this method to provide different defaults"""
        return {
            'short_name': self.name,
            'enabled': True
        }

    def get_config(self):
        config = self.get_default_config()
        config.update(self.config)

        return config

    def _do_configure(self):
        config = self.get_config()
        self.inhibit_schedules = config.get('inhibit_schedules', False)
        try:
            self.configure(config)
            mod = importlib.import_module(self.modspec)
            if hasattr(mod, 'configure'):
                # Call module-level configure method, passing it's module specific config
                log.info('[%s] Calling configure() for module [%s]', self.name, self.modspec)
                mod.configure(self.config)
        except Exception as e:
            raise PluginLoadException from e


# Path: marvinbot/defaults.py
# DEFAULT_PRIORITY = 2
# 
# Path: marvinbot/errors.py
# class PluginLoadException(Exception):
#     pass
# 
# Path: marvinbot/signals.py



# Path: marvinbot/plugins.py
from flask import Blueprint
from marvinbot.defaults import DEFAULT_PRIORITY
from marvinbot.errors import PluginLoadException
from marvinbot.signals import plugin_loaded
from urllib.parse import quote_plus
import importlib
import logging

        self.enabled = enabled

    def get_default_config(self) -> dict:
        """Returns a dict with the default config for the plugin.

        Subclasses can override this method to provide different defaults"""
        return {
            'short_name': self.name,
            'enabled': True
        }

    def get_config(self):
        config = self.get_default_config()
        config.update(self.config)

        return config

    def _do_configure(self):
        config = self.get_config()
        self.inhibit_schedules = config.get('inhibit_schedules', False)
        try:
            self.configure(config)
            mod = importlib.import_module(self.modspec)
            if hasattr(mod, 'configure'):
                # Call module-level configure method, passing it's module specific config
                log.info('[%s] Calling configure() for module [%s]', self.name, self.modspec)
                mod.configure(self.config)
        except Exception as e:
            raise PluginLoadException from e


    def configure(self, config):