From 9a5925b1adba525801d0c2457c595239b8699204 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Sun, 1 Dec 2024 07:54:44 -0800 Subject: [PATCH] refactor: fix has_bangs initialization and use |= operator --- aider/watch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/watch.py b/aider/watch.py index 9232137ac..6fd2a85b2 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -172,12 +172,12 @@ class FileWatcher: # Refresh all AI comments from tracked files ai_comments = {} - #ai has_bangs should be False and |= ! + has_bangs = False for fname in self.coder.abs_fnames: line_nums, comments, has_bang = self.get_ai_comments(fname) if line_nums: ai_comments[fname] = comments - has_bangs = has_bang + has_bangs |= has_bang if not has_bangs: return ""