Skip to content

Commit 54f720c

Browse files
committed
Fix linting
1 parent d370c0a commit 54f720c

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

tests/test_graph_storage.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -746,23 +746,30 @@ async def test_graph_batch_operations(storage):
746746

747747
# 检查是否包含与机器学习、自然语言处理和计算机视觉的连接(忽略方向)
748748
has_connection_with_node2 = any(
749-
(src == node2_id and tgt == node3_id) or (src == node3_id and tgt == node2_id)
749+
(src == node2_id and tgt == node3_id)
750+
or (src == node3_id and tgt == node2_id)
750751
for src, tgt in nodes_edges[node3_id]
751752
)
752753
has_connection_with_node4 = any(
753-
(src == node3_id and tgt == node4_id) or (src == node4_id and tgt == node3_id)
754+
(src == node3_id and tgt == node4_id)
755+
or (src == node4_id and tgt == node3_id)
754756
for src, tgt in nodes_edges[node3_id]
755757
)
756758
has_connection_with_node5 = any(
757-
(src == node3_id and tgt == node5_id) or (src == node5_id and tgt == node3_id)
759+
(src == node3_id and tgt == node5_id)
760+
or (src == node5_id and tgt == node3_id)
758761
for src, tgt in nodes_edges[node3_id]
759762
)
760763

761764
assert (
762765
has_connection_with_node2
763766
), f"节点 {node3_id} 的边列表中应包含与 {node2_id} 的连接"
764-
assert has_connection_with_node4, f"节点 {node3_id} 的边列表中应包含与 {node4_id} 的连接"
765-
assert has_connection_with_node5, f"节点 {node3_id} 的边列表中应包含与 {node5_id} 的连接"
767+
assert (
768+
has_connection_with_node4
769+
), f"节点 {node3_id} 的边列表中应包含与 {node4_id} 的连接"
770+
assert (
771+
has_connection_with_node5
772+
), f"节点 {node3_id} 的边列表中应包含与 {node5_id} 的连接"
766773

767774
print("无向图特性验证成功:批量获取的节点边包含所有相关的边(无论方向)")
768775

0 commit comments

Comments
 (0)