style: fix string quotes in regex pattern

This commit is contained in:
Paul Gauthier (aider) 2024-10-25 13:22:17 -07:00
parent 43790db48e
commit d535035bdd

View file

@ -101,7 +101,8 @@ def watch_source_files(
with open(path_abs) as f:
content = f.read()
import re
return bool(re.search(r'(?:^|\n)(?:#|//) *ai\w', content, re.IGNORECASE))
return bool(re.search(r"(?:^|\n)(?:#|//) *ai\w", content, re.IGNORECASE))
except (IOError, UnicodeDecodeError):
return False