From 114fb2a8891782077a26a849812c1fcf3ab7fb20 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 27 Sep 2024 14:26:56 -0700 Subject: [PATCH] style: Improve code formatting and readability --- aider/commands.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index e16586203..74a0dd956 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -1172,11 +1172,17 @@ class Commands: try: pyperclip.copy(last_assistant_message) - preview = last_assistant_message[:50] + "..." if len(last_assistant_message) > 50 else last_assistant_message + preview = ( + last_assistant_message[:50] + "..." + if len(last_assistant_message) > 50 + else last_assistant_message + ) self.io.tool_output(f"Copied last assistant message to clipboard. Preview: {preview}") except pyperclip.PyperclipException as e: self.io.tool_error(f"Failed to copy to clipboard: {str(e)}") - self.io.tool_output("You may need to install xclip or xsel on Linux, or pbcopy on macOS.") + self.io.tool_output( + "You may need to install xclip or xsel on Linux, or pbcopy on macOS." + ) except Exception as e: self.io.tool_error(f"An unexpected error occurred while copying to clipboard: {str(e)}")