From 07bcb54ed3320742cab0e469096899a0c2c1f031 Mon Sep 17 00:00:00 2001 From: lixiangcheng1 Date: Wed, 31 Dec 2025 08:54:36 +0800 Subject: [PATCH] [fix]entity_resolution.py:199: SyntaxWarning: invalid escape sequence '\d' --- api/app/core/rag/graphrag/entity_resolution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/core/rag/graphrag/entity_resolution.py b/api/app/core/rag/graphrag/entity_resolution.py index d648e5a1..20af8818 100644 --- a/api/app/core/rag/graphrag/entity_resolution.py +++ b/api/app/core/rag/graphrag/entity_resolution.py @@ -196,7 +196,7 @@ class EntityResolution(Extractor): ans_list = [] records = [r.strip() for r in results.split(record_delimiter)] for record in records: - pattern_int = f"{re.escape(entity_index_delimiter)}(\d+){re.escape(entity_index_delimiter)}" + pattern_int = fr"{re.escape(entity_index_delimiter)}(\d+){re.escape(entity_index_delimiter)}" match_int = re.search(pattern_int, record) res_int = int(str(match_int.group(1) if match_int else '0')) if res_int > records_length: