From 413ddb84dfbbf2aebd5980f11d1d08b25b55a140 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 5 Jul 2023 20:33:46 -0700 Subject: [PATCH] refactor to use io.read_text --- aider/coders/wholefile_coder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/coders/wholefile_coder.py b/aider/coders/wholefile_coder.py index c37f531bb..2c77d00fa 100644 --- a/aider/coders/wholefile_coder.py +++ b/aider/coders/wholefile_coder.py @@ -53,7 +53,7 @@ class WholeFileCoder(Coder): full_path = (Path(self.root) / fname).absolute() if mode == "diff" and full_path.exists(): - orig_lines = full_path.read_text().splitlines(keepends=True) + orig_lines = self.io.read_text(full_path).splitlines(keepends=True) show_diff = diffs.diff_partial_update( orig_lines, @@ -109,7 +109,7 @@ class WholeFileCoder(Coder): full_path = (Path(self.root) / fname).absolute() if mode == "diff" and full_path.exists(): - orig_lines = full_path.read_text().splitlines(keepends=True) + orig_lines = self.io.read_text(full_path).splitlines(keepends=True) show_diff = diffs.diff_partial_update( orig_lines,