mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
refactor to use io.write_text
This commit is contained in:
parent
0ea52b412f
commit
b46dffbb20
5 changed files with 16 additions and 15 deletions
|
@ -136,7 +136,10 @@ class EditBlockFunctionCoder(Coder):
|
|||
if not full_path:
|
||||
continue
|
||||
content = self.io.read_text(full_path)
|
||||
if do_replace(full_path, content, original, updated, self.dry_run):
|
||||
content = do_replace(full_path, content, original, updated)
|
||||
if content:
|
||||
if not self.dry_run:
|
||||
self.io.write_text(full_path, content)
|
||||
edited.add(path)
|
||||
continue
|
||||
self.io.tool_error(f"Failed to apply edit to {path}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue