fix: auto-fix code issues (cron)

- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
This commit is contained in:
OpenClaw Bot
2026-02-28 09:15:51 +08:00
parent 74c2daa5ef
commit 1a9b5391f7
37 changed files with 1112 additions and 19 deletions

View File

@@ -36,6 +36,7 @@ try:
except ImportError:
REPORTLAB_AVAILABLE = False
@dataclass
class ExportEntity:
id: str
@@ -46,6 +47,7 @@ class ExportEntity:
mention_count: int
attributes: dict[str, Any]
@dataclass
class ExportRelation:
id: str
@@ -55,6 +57,7 @@ class ExportRelation:
confidence: float
evidence: str
@dataclass
class ExportTranscript:
id: str
@@ -64,6 +67,7 @@ class ExportTranscript:
segments: list[dict]
entity_mentions: list[dict]
class ExportManager:
"""导出管理器 - 处理各种导出需求"""
@@ -605,9 +609,11 @@ class ExportManager:
return json.dumps(data, ensure_ascii=False, indent=2)
# 全局导出管理器实例
_export_manager = None
def get_export_manager(db_manager=None) -> None:
"""获取导出管理器实例"""
global _export_manager