From b09617b9df56881ba9afab3e5e30ba578e621e59 Mon Sep 17 00:00:00 2001 From: shenchucheng Date: Tue, 20 Aug 2024 20:25:45 +0800 Subject: [PATCH] fix patch suffix error --- metagpt/tools/libs/cr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metagpt/tools/libs/cr.py b/metagpt/tools/libs/cr.py index cdc3f81ce..e3509591b 100644 --- a/metagpt/tools/libs/cr.py +++ b/metagpt/tools/libs/cr.py @@ -88,7 +88,7 @@ class CodeReview: async with aiofiles.open(patch_path, encoding="utf-8") as f: patch_file_content = await f.read() await EditorReporter().async_report(patch_path) - if not patch_path.endswith((".diff", "patch")): + if not patch_path.endswith((".diff", ".patch")): name = Path(patch_path).name patch_file_content = "".join( difflib.unified_diff([], patch_file_content.splitlines(keepends=True), "/dev/null", f"b/{name}"),