docstrings in ki qualität, weil ki sie geschrieben hat

This commit is contained in:
derlole
2025-06-03 17:28:29 +00:00
parent ab48acbfd9
commit af2119f04d
8 changed files with 33 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ socketio = SocketIO(cors_allowed_origins="*", async_mode='threading')
# function to change the datetime format to isoformat because json does not support datetime
def convert_datetimes(obj):
"""Convert datetime objects in a dict or list to a specific string format."""
if isinstance(obj, dict):
return {k: convert_datetimes(v) for k, v in obj.items()}
elif isinstance(obj, list):
@@ -19,6 +20,7 @@ def convert_datetimes(obj):
def resend_static_data():
"""Resend static data to the frontend via SocketIO."""
water = load_dict("water")
beans = load_dict("beans")
machine = load_dict("machine")