style: fix ruff formatting in bracket_view and routes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+14
-3
@@ -2,7 +2,14 @@ import json
|
||||
import logging
|
||||
|
||||
import requests as http_requests
|
||||
from flask import abort, make_response, render_template, jsonify, request, send_from_directory
|
||||
from flask import (
|
||||
abort,
|
||||
make_response,
|
||||
render_template,
|
||||
jsonify,
|
||||
request,
|
||||
send_from_directory,
|
||||
)
|
||||
|
||||
from app import APP_VERSION, app, static_v
|
||||
from app.config import SCOREBOARD_DATA_FILE
|
||||
@@ -93,13 +100,17 @@ def get_scoreboard():
|
||||
return jsonify({"error": "Invalid date format. Use YYYY-MM-DD."}), 400
|
||||
scoreboard_data = _fetch_date(date_param)
|
||||
if not scoreboard_data:
|
||||
return jsonify({"error": "Failed to retrieve scoreboard data for that date."})
|
||||
return jsonify(
|
||||
{"error": "Failed to retrieve scoreboard data for that date."}
|
||||
)
|
||||
else:
|
||||
try:
|
||||
with open(SCOREBOARD_DATA_FILE, "r") as json_file:
|
||||
scoreboard_data = json.load(json_file)
|
||||
except FileNotFoundError:
|
||||
return jsonify({"error": "Failed to retrieve scoreboard data. File not found."})
|
||||
return jsonify(
|
||||
{"error": "Failed to retrieve scoreboard data. File not found."}
|
||||
)
|
||||
except json.JSONDecodeError:
|
||||
return jsonify(
|
||||
{"error": "Failed to retrieve scoreboard data. Invalid JSON format."}
|
||||
|
||||
Reference in New Issue
Block a user