mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
WIP: Refactor Coder class to use set instead of dict for fnames.
This commit is contained in:
parent
82cf653d73
commit
c6197fd121
1 changed files with 3 additions and 3 deletions
6
coder.py
6
coder.py
|
@ -29,7 +29,7 @@ openai.api_key = os.getenv("OPENAI_API_KEY")
|
|||
|
||||
|
||||
class Coder:
|
||||
fnames = dict()
|
||||
fnames = set()
|
||||
last_modified = 0
|
||||
repo = None
|
||||
|
||||
|
@ -55,7 +55,7 @@ class Coder:
|
|||
else:
|
||||
self.console.print(f"[red]Loading {fname}")
|
||||
|
||||
self.fnames[str(fname)] = fname.stat().st_mtime
|
||||
self.fnames.add(str(fname))
|
||||
|
||||
self.set_repo()
|
||||
if not self.repo:
|
||||
|
@ -333,7 +333,7 @@ class Coder:
|
|||
self.console.print(f"[red]Skipping edit to {path}")
|
||||
continue
|
||||
|
||||
self.fnames[path] = 0
|
||||
self.fnames.add(path)
|
||||
|
||||
edited.add(path)
|
||||
if utils.do_replace(path, original, updated):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue