lint + formating with black (#158)

* lint + formating with black

* add black as pre commit
This commit is contained in:
Co Tran 2024-10-09 11:25:07 -07:00 committed by GitHub
parent 498e7f9724
commit 5c4a6bc8ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 581 additions and 295 deletions

View file

@ -13,9 +13,10 @@ def get_device_summary():
# Validate 'device_ids' parameter
device_ids = data.get("device_ids")
if not device_ids or not isinstance(device_ids, list):
return jsonify(
{"error": "'device_ids' parameter is required and must be a list"}
), 400
return (
jsonify({"error": "'device_ids' parameter is required and must be a list"}),
400,
)
# Validate 'time_range' parameter (optional, defaults to 7)
time_range = data.get("time_range", 7)

View file

@ -119,9 +119,10 @@ def process_rag():
intent_changed = True
else:
# Invalid value provided
return jsonify(
{"error": "Invalid value for x-arch-prompt-intent-change header"}
), 400
return (
jsonify({"error": "Invalid value for x-arch-prompt-intent-change header"}),
400,
)
# Update user conversation based on intent change
memory = update_user_conversation(user_id, client_messages, intent_changed)

View file

@ -13,9 +13,10 @@ def get_device_summary():
# Validate 'device_ids' parameter
device_ids = data.get("device_ids")
if not device_ids or not isinstance(device_ids, list):
return jsonify(
{"error": "'device_ids' parameter is required and must be a list"}
), 400
return (
jsonify({"error": "'device_ids' parameter is required and must be a list"}),
400,
)
# Validate 'time_range' parameter (optional, defaults to 7)
time_range = data.get("time_range", 7)