From 490c6d9a28438f32cff56b7d1a2496936ff1aa53 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 7 Mar 2025 16:00:47 -0800 Subject: [PATCH] style: Apply linter formatting to base_coder.py --- aider/coders/base_coder.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index c79d6a833..bdcd061a2 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -1709,7 +1709,7 @@ class Coder: # Helper function to ensure exactly one blank line before replacement def ensure_one_blank_line(match): - content_before = match.string[:match.start()].rstrip() + content_before = match.string[: match.start()].rstrip() # If we're not at the start of the text, add exactly one blank line if content_before: return f"{content_before}\n\n{match.group(1)}" @@ -1718,13 +1718,13 @@ class Coder: # Replace opening tag with proper spacing text = re.sub(f"\\s*<{tag_name}>\\s*", f"\n\n{REASONING_START}\n", text) - + # Replace closing tag with proper spacing text = re.sub(f"\\s*\\s*", f"\n\n{REASONING_END}", text) - + # Clean up any excessive newlines (more than 2 consecutive) - text = re.sub(r'\n{3,}', '\n\n', text) - + text = re.sub(r"\n{3,}", "\n\n", text) + return text def show_send_output(self, completion):