From 32285008f586b42b603fc66f951204878710db6c Mon Sep 17 00:00:00 2001 From: Pranav Gaikwad Date: Thu, 6 Feb 2025 12:44:43 -0500 Subject: [PATCH] :bug: fix fuzzy equals for maven errors (#626) Signed-off-by: Pranav Gaikwad --- .../task_runner/compiler/maven_validator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kai/reactive_codeplanner/task_runner/compiler/maven_validator.py b/kai/reactive_codeplanner/task_runner/compiler/maven_validator.py index f4793c19..5a893966 100755 --- a/kai/reactive_codeplanner/task_runner/compiler/maven_validator.py +++ b/kai/reactive_codeplanner/task_runner/compiler/maven_validator.py @@ -114,6 +114,10 @@ def fuzzy_equals(self, error2: Task, offset: int = 1) -> bool: return False if not super().__eq__(error2): return False + # if both errors don't have error lines and super() + # is equal, then these must be equal + if not self.error_lines and not error2.error_lines: + return True if not self.error_lines or not error2.error_lines: return False matching_lines: list[int] = []