From 1f874b654db3c38a200ec81600d8b470a17f29a6 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 11 Mar 2025 17:31:22 -0700 Subject: [PATCH] style: Format code with linter and improve readability --- aider/commands.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index 8d12cdaa7..dc51712c9 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -77,7 +77,7 @@ class Commands: self.help = None self.editor = editor - + # Store the original read-only filenames provided via args.read self.original_read_only_fnames = set(original_read_only_fnames or []) @@ -359,14 +359,17 @@ class Commands: def _drop_all_files(self): self.coder.abs_fnames = set() - + # When dropping all files, keep those that were originally provided via args.read - if hasattr(self, 'original_read_only_fnames') and self.original_read_only_fnames: + if hasattr(self, "original_read_only_fnames") and self.original_read_only_fnames: # Keep only the original read-only files to_keep = set() for abs_fname in self.coder.abs_read_only_fnames: rel_fname = self.coder.get_rel_fname(abs_fname) - if abs_fname in self.original_read_only_fnames or rel_fname in self.original_read_only_fnames: + if ( + abs_fname in self.original_read_only_fnames + or rel_fname in self.original_read_only_fnames + ): to_keep.add(abs_fname) self.coder.abs_read_only_fnames = to_keep else: @@ -838,7 +841,9 @@ class Commands: if not args.strip(): if self.original_read_only_fnames: - self.io.tool_output("Dropping all files from the chat session except originally read-only files.") + self.io.tool_output( + "Dropping all files from the chat session except originally read-only files." + ) else: self.io.tool_output("Dropping all files from the chat session.") self._drop_all_files()