From e1ce4f1b9f672d63525464bb2882cfcb684dd0c3 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 9 Aug 2024 08:04:18 -0300 Subject: [PATCH] style: format code with linter --- aider/commands.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index 6b9d59b93..2e44f3fb5 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -907,13 +907,15 @@ class Commands: image.save(temp_file_path, "PNG") abs_file_path = Path(temp_file_path).resolve() - + # Check if a file with the same name already exists in the chat - existing_file = next((f for f in self.coder.abs_fnames if Path(f).name == abs_file_path.name), None) + existing_file = next( + (f for f in self.coder.abs_fnames if Path(f).name == abs_file_path.name), None + ) if existing_file: self.coder.abs_fnames.remove(existing_file) self.io.tool_output(f"Replaced existing image in the chat: {existing_file}") - + self.coder.abs_fnames.add(str(abs_file_path)) self.io.tool_output(f"Added clipboard image to the chat: {abs_file_path}") self.coder.check_added_files()