style: fix linting issues and whitespace in watch.py

This commit is contained in:
Paul Gauthier (aider) 2024-10-25 16:20:57 -07:00
parent 130aedc474
commit 25dd9f1f35

View file

@ -10,6 +10,7 @@ from aider.dump import dump # noqa
VERBOSE = True
def is_source_file(path: Path) -> bool:
"""
Check if a file is a source file that uses # or // style comments.
@ -133,13 +134,11 @@ def watch_source_files(
if comments := get_ai_comment(file, encoding=encoding):
result[file] = comments
if VERBOSE: dump(result)
if VERBOSE:
dump(result)
yield result
def get_ai_comment(filepath, encoding="utf-8"):
"""Extract all AI comments from a file"""
comments = []