mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-03-15 20:34:31 +00:00
Bulk convert comments above classes/functions/methods into proper docstrings
This commit is contained in:
@@ -25,8 +25,9 @@ cleanup_timer = None
|
||||
run = True
|
||||
|
||||
|
||||
# Shutdown function
|
||||
def shutdown(sig, frame):
|
||||
"""Shutdown function"""
|
||||
|
||||
global run
|
||||
|
||||
logging.info("Stopping program...")
|
||||
@@ -44,15 +45,17 @@ def shutdown(sig, frame):
|
||||
os._exit(0)
|
||||
|
||||
|
||||
# Utility method to get a spot provider based on the class specified in its config entry.
|
||||
def get_spot_provider_from_config(config_providers_entry):
|
||||
"""Utility method to get a spot provider based on the class specified in its config entry."""
|
||||
|
||||
module = importlib.import_module('spotproviders.' + config_providers_entry["class"].lower())
|
||||
provider_class = getattr(module, config_providers_entry["class"])
|
||||
return provider_class(config_providers_entry)
|
||||
|
||||
|
||||
# Utility method to get an alert provider based on the class specified in its config entry.
|
||||
def get_alert_provider_from_config(config_providers_entry):
|
||||
"""Utility method to get an alert provider based on the class specified in its config entry."""
|
||||
|
||||
module = importlib.import_module('alertproviders.' + config_providers_entry["class"].lower())
|
||||
provider_class = getattr(module, config_providers_entry["class"])
|
||||
return provider_class(config_providers_entry)
|
||||
|
||||
Reference in New Issue
Block a user