chore: perform widespread code cleanup and formatting

Perform a comprehensive code cleanup across multiple modules to improve code quality, consistency, and maintainability.

Key changes include:
- Removing numerous unused imports.
- Standardizing import order.
- Eliminating trailing whitespace and inconsistent newlines.
- Updating legacy type hints to modern syntax (e.g., `List` -> `list`).
- Making minor improvements for code robustness and style.
This commit is contained in:
minecraft1024a
2025-11-15 17:12:46 +08:00
parent bd45899dce
commit 6f62073630
26 changed files with 109 additions and 117 deletions

View File

@@ -3,8 +3,6 @@ from collections import defaultdict
from datetime import datetime, timedelta
from typing import Any
import aiofiles
from src.common.database.compatibility import db_get, db_query
from src.common.database.core.models import LLMUsage, Messages, OnlineTime
from src.common.logger import get_logger
@@ -16,7 +14,7 @@ logger = get_logger("maibot_statistic")
# 彻底异步化:删除原同步包装器 _sync_db_get所有数据库访问统一使用 await db_get。
from .report_generator import HTMLReportGenerator, format_online_time
from .report_generator import HTMLReportGenerator
from .statistic_keys import *