From 78c20a8c252eeaaa826e4f0f30758bf2773886ab Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Sun, 1 Dec 2024 07:22:16 -0800 Subject: [PATCH] style: fix linting issues in watch.py --- aider/watch.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/aider/watch.py b/aider/watch.py index 0f042a9b9..cb42ad997 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -59,6 +59,7 @@ def load_gitignores(gitignore_paths: list[Path]) -> Optional[PathSpec]: return PathSpec.from_lines(GitWildMatchPattern, patterns) if patterns else None + class FileWatcher: """Watches source files for changes and AI comments""" @@ -67,7 +68,7 @@ class FileWatcher: self.io = coder.io self.encoding = encoding self.root = Path(coder.root) - self.verbose = verbose #or True + self.verbose = verbose # or True self.stop_event = None self.watcher_thread = None self.changed_files = set() @@ -175,13 +176,16 @@ class FileWatcher: has_bangs = any( comment.strip().endswith("!") for comments in self.changed_files.values() - if comments for comment in comments + if comments + for comment in comments ) if not has_bangs: return "" - res = "\n".join(comment for comments in self.changed_files.values() if comments for comment in comments) + res = "\n".join( + comment for comments in self.changed_files.values() if comments for comment in comments + ) res = """The "ai" comments below can be found in the code above. They contain your instructions. Make the requested changes.