Bulk convert comments above classes/functions/methods into proper docstrings

This commit is contained in:
Ian Renton
2026-02-27 14:21:35 +00:00
parent 068c732796
commit 6b18ec6f88
63 changed files with 540 additions and 349 deletions

View File

@@ -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)