Merge pull request #1216 from akaihola/misc-cleanups

Clean up types and drop an unused variable
This commit is contained in:
paul-gauthier 2024-08-29 13:16:48 -07:00 committed by GitHub
commit 59cb457008
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 14 deletions

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