fix: auto-fix code issues (cron)
- 修复裸异常捕获 (E722) - 改为具体异常类型 - 修复重复导入/字段定义问题 - 修复PEP8格式问题 (W291 trailing whitespace, E226, E741) - 修复未使用变量 (F841) - 修复变量名遮蔽 (F402) - 修复未定义名称 (F821) - 添加 urllib.parse 导入 - 修复 f-string 缺少占位符 (F541) - 修复模块级导入位置 (E402) - 修复行尾空白和空行问题 - 优化代码结构,提升可读性
This commit is contained in:
@@ -360,7 +360,8 @@ class KnowledgeReasoner:
|
||||
|
||||
使用 BFS 在关系图中搜索路径
|
||||
"""
|
||||
entities = {e["id"]: e for e in graph_data.get("entities", [])}
|
||||
# 实体数据可用于调试或扩展功能
|
||||
_ = {e["id"]: e for e in graph_data.get("entities", [])}
|
||||
relations = graph_data.get("relations", [])
|
||||
|
||||
# 构建邻接表
|
||||
|
||||
Reference in New Issue
Block a user