Refactor code for improved readability and consistency

- Cleaned up whitespace and formatting in various files including http.py, language.py, logger.py, safe_exec.py, and SQL migration scripts.
- Consolidated import statements and removed unnecessary blank lines.
- Updated logging configuration for better clarity.
- Enhanced the safe execution code with improved error handling and logging.
- Removed commented-out code and unnecessary variables in backfill_zero_trades.py and other scripts.
- Added a pyproject.toml for Ruff and Vulture configuration.
- Introduced requirements-dev.txt for development dependencies.
- Removed commented-out stock entries in init.sql for cleaner migration scripts.
This commit is contained in:
dienakdz
2026-04-09 14:30:51 +07:00
parent 103055b3df
commit 87f2845483
157 changed files with 19026 additions and 17773 deletions
+3 -4
View File
@@ -6,12 +6,12 @@ The current version first implements the minimum availability of "fast commercia
- Users activate/issue points immediately after purchasing on the front end (can be replaced with a real payment gateway later)
"""
from flask import Blueprint, jsonify, request, g
from flask import Blueprint, g, jsonify, request
from app.utils.auth import login_required
from app.utils.logger import get_logger
from app.services.billing_service import get_billing_service
from app.services.usdt_payment_service import get_usdt_payment_service
from app.utils.auth import login_required
from app.utils.logger import get_logger
logger = get_logger(__name__)
@@ -102,4 +102,3 @@ def usdt_get_order(order_id: int):
except Exception as e:
logger.error(f"usdt_get_order failed: {e}", exc_info=True)
return jsonify({"code": 0, "msg": str(e), "data": None}), 500