mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
refactor: extract regex pattern into compiled class attribute
This commit is contained in:
parent
56aaa08224
commit
c9df6c11c5
1 changed files with 1 additions and 0 deletions
|
@ -205,6 +205,7 @@ class FileWatcher:
|
|||
try:
|
||||
content = self.io.read_text(filepath)
|
||||
for line in content.splitlines():
|
||||
#ai refactor the regex into self, compile it!
|
||||
if match := re.search(r"(?:#|//) *(ai\b.*|ai)", line, re.IGNORECASE):
|
||||
comment = match.group(0).strip()
|
||||
if comment:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue