mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
refactor: simplify gitignore filter function creation
This commit is contained in:
parent
b1dbf340b8
commit
aa6d9779d3
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ class FileWatcher:
|
||||||
self.changed_files = set()
|
self.changed_files = set()
|
||||||
self.gitignores = gitignores
|
self.gitignores = gitignores
|
||||||
|
|
||||||
# Create filter function during initialization
|
#ai stop making this so indirect; just `def filter_func()` and use self.gitignores in it!
|
||||||
gitignore_paths = [Path(g) for g in self.gitignores] if self.gitignores else []
|
gitignore_paths = [Path(g) for g in self.gitignores] if self.gitignores else []
|
||||||
gitignore_spec = load_gitignores(gitignore_paths)
|
gitignore_spec = load_gitignores(gitignore_paths)
|
||||||
self.filter_func = self.create_filter_func(gitignore_spec, None)
|
self.filter_func = self.create_filter_func(gitignore_spec, None)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue