fix: auto-fix code issues (cron)

- 修复未定义名称 (F821): 添加缺失的导入
  - ExportEntity, ExportRelation, ExportTranscript
  - WorkflowManager, PluginManager, OpsManager
  - urllib.parse
- 修复裸异常捕获: except: → except Exception:
- 删除 __pycache__ 缓存文件
- 格式化代码 (PEP8)

自动化修复: 23个问题
剩余需手动处理: 104个行长度问题 (E501)
This commit is contained in:
AutoFix Bot
2026-03-01 21:14:19 +08:00
parent e46c938b40
commit cdf0e80851
53 changed files with 358 additions and 17 deletions

View File

@@ -174,6 +174,7 @@ class TextEmbedding:
model_name: str
created_at: str
# ==================== 全文搜索 ====================
@@ -785,6 +786,7 @@ class FullTextSearch:
conn.close()
return stats
# ==================== 语义搜索 ====================
@@ -1148,6 +1150,7 @@ class SemanticSearch:
print(f"删除 embedding 失败: {e}")
return False
# ==================== 实体关系路径发现 ====================
@@ -1620,6 +1623,7 @@ class EntityPathDiscovery:
bridge_scores.sort(key=lambda x: x["bridge_score"], reverse=True)
return bridge_scores[:20] # 返回前20
# ==================== 知识缺口识别 ====================
@@ -2025,6 +2029,7 @@ class KnowledgeGapDetection:
return recommendations
# ==================== 搜索管理器 ====================
@@ -2212,6 +2217,7 @@ def get_search_manager(db_path: str = "insightflow.db") -> SearchManager:
_search_manager = SearchManager(db_path)
return _search_manager
# 便捷函数