From c9fc2efdd7bd8e67d0b0a8d73d6113a656f06d16 Mon Sep 17 00:00:00 2001 From: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Thu, 29 Aug 2024 21:25:53 +0300 Subject: [PATCH] fix: type comparisons should use `is` --- aider/coders/editblock_func_coder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/coders/editblock_func_coder.py b/aider/coders/editblock_func_coder.py index 42bbb20f3..27aa53f11 100644 --- a/aider/coders/editblock_func_coder.py +++ b/aider/coders/editblock_func_coder.py @@ -111,9 +111,9 @@ class EditBlockFunctionCoder(Coder): updated = get_arg(edit, "updated_lines") # gpt-3.5 returns lists even when instructed to return a string! - if self.code_format == "list" or type(original) == list: + if self.code_format == "list" or type(original) is list: original = "\n".join(original) - if self.code_format == "list" or type(updated) == list: + if self.code_format == "list" or type(updated) is list: updated = "\n".join(updated) if original and not original.endswith("\n"):