Skip to content

Commit 01f429e

Browse files
authored
Fix: Ensure compatibility with Python versions older than 3.12
2 parents 0cea71b + c7a6e7a commit 01f429e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nano_graphrag/_op.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ async def _pack_single_community_describe(
530530

531531
# 4. 准备节点和边数据(过滤子社区已包含的)
532532
def format_row(row: list) -> str:
533-
return ','.join(f'"{str(item).replace("\"", "\"\"")}"' for item in row)
533+
return ','.join('"{}"'.format(str(item).replace('"', '""')) for item in row)
534534

535535
node_fields = ["id", "entity", "type", "description", "degree"]
536536
edge_fields = ["id", "source", "target", "description", "rank"]

0 commit comments

Comments
 (0)