From ff62734fa1235484d7d591bc385cc088c1b5dbbc Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 10 May 2023 19:51:25 -0700 Subject: [PATCH] aider: Fixed line length issue by splitting a long line into two lines. # Context: USER: aider/commands.py:155:101: E501 line too long (117 > 100 characters) ASSISTANT: To fix the line length issue, you can split the long line into multiple lines. Here's the change: ```python aider/commands.py <<<<<<< ORIGINAL if not matched_files: if self.coder.repo is not None: create_file = Confirm.ask( f"[bright_black]No files matched '{word}'. Do you want to create the file and add it to git?" ) ======= if not matched_files: if self.coder.repo is not None: create_file = Confirm.ask( f"[bright_black]No files matched '{word}'. " "Do you want to create the file and add it to git?" ) >>>>>>> UPDATED ``` This change splits the long line into two lines, keeping the code within the 100 characters limit. --- aider/commands.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index f4f41e612..43aefd0ae 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -149,11 +149,12 @@ class Commands: files = self.coder.get_all_relative_files() for word in args.split(): matched_files = [file for file in files if word in file] - if not matched_files: - if self.coder.repo is not None: - create_file = Confirm.ask( - f"[bright_black]No files matched '{word}'. Do you want to create the file and add it to git?" - ) + if not matched_files: + if self.coder.repo is not None: + create_file = Confirm.ask( + f"[bright_black]No files matched '{word}'. " + "Do you want to create the file and add it to git?" + ) else: create_file = Confirm.ask( f"[bright_black]No files matched '{word}'. Do you want to create the file?"