mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 03:05:00 +00:00
refactor: fix has_bangs initialization and use |= operator
This commit is contained in:
parent
60f2da370f
commit
9a5925b1ad
1 changed files with 2 additions and 2 deletions
|
@ -172,12 +172,12 @@ class FileWatcher:
|
||||||
|
|
||||||
# Refresh all AI comments from tracked files
|
# Refresh all AI comments from tracked files
|
||||||
ai_comments = {}
|
ai_comments = {}
|
||||||
#ai has_bangs should be False and |= !
|
has_bangs = False
|
||||||
for fname in self.coder.abs_fnames:
|
for fname in self.coder.abs_fnames:
|
||||||
line_nums, comments, has_bang = self.get_ai_comments(fname)
|
line_nums, comments, has_bang = self.get_ai_comments(fname)
|
||||||
if line_nums:
|
if line_nums:
|
||||||
ai_comments[fname] = comments
|
ai_comments[fname] = comments
|
||||||
has_bangs = has_bang
|
has_bangs |= has_bang
|
||||||
|
|
||||||
if not has_bangs:
|
if not has_bangs:
|
||||||
return ""
|
return ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue