fix: auto-fix code issues (cron)
- 修复重复导入/字段 - 修复异常处理 - 修复PEP8格式问题 - 添加类型注解
This commit is contained in:
@@ -36,7 +36,6 @@ try:
|
||||
except ImportError:
|
||||
REPORTLAB_AVAILABLE = False
|
||||
|
||||
|
||||
@dataclass
|
||||
class ExportEntity:
|
||||
id: str
|
||||
@@ -47,7 +46,6 @@ class ExportEntity:
|
||||
mention_count: int
|
||||
attributes: dict[str, Any]
|
||||
|
||||
|
||||
@dataclass
|
||||
class ExportRelation:
|
||||
id: str
|
||||
@@ -57,7 +55,6 @@ class ExportRelation:
|
||||
confidence: float
|
||||
evidence: str
|
||||
|
||||
|
||||
@dataclass
|
||||
class ExportTranscript:
|
||||
id: str
|
||||
@@ -67,7 +64,6 @@ class ExportTranscript:
|
||||
segments: list[dict]
|
||||
entity_mentions: list[dict]
|
||||
|
||||
|
||||
class ExportManager:
|
||||
"""导出管理器 - 处理各种导出需求"""
|
||||
|
||||
@@ -615,11 +611,9 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user