fix: auto-fix code issues (cron)

- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题 (E302, E305, E501)
- 修复行长度超过100字符的问题
- 修复F821未定义名称错误
This commit is contained in:
AutoFix Bot
2026-03-01 18:19:06 +08:00
parent 8f59c7b17c
commit e46c938b40
36 changed files with 1102 additions and 28 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:
"""导出管理器 - 处理各种导出需求"""
@@ -611,9 +615,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