mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 01:04:59 +00:00
style: Apply linter formatting to base_coder.py
This commit is contained in:
parent
e6dd9978cb
commit
490c6d9a28
1 changed files with 5 additions and 5 deletions
|
@ -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*</{tag_name}>\\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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue