refactor to use io.write_text

This commit is contained in:
Paul Gauthier 2023-07-05 21:18:19 -07:00
parent 0ea52b412f
commit b46dffbb20
5 changed files with 16 additions and 15 deletions

View file

@ -924,7 +924,7 @@ class Coder:
if full_path in self.abs_fnames:
if not self.dry_run and write_content:
Path(full_path).write_text(write_content)
self.io.write_text(full_path, write_content)
return full_path
if not Path(full_path).exists():
@ -950,7 +950,7 @@ class Coder:
self.repo.git.add(full_path)
if not self.dry_run and write_content:
Path(full_path).write_text(write_content)
self.io.write_text(full_path, write_content)
return full_path