fix: type comparisons should use is

This commit is contained in:
Antti Kaihola 2024-08-29 21:25:53 +03:00
parent 5376ae25e2
commit c9fc2efdd7

View file

@ -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"):