From c08dcff56da2f802a3ef5a0f178d7fbc4aa0ec29 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 25 Oct 2024 09:55:54 -0700 Subject: [PATCH] style: fix linting issues in watch.py --- aider/watch.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aider/watch.py b/aider/watch.py index a91a5275c..87b097ab5 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -4,8 +4,10 @@ from typing import Optional, Set from pathspec import PathSpec from pathspec.patterns import GitWildMatchPattern from watchfiles import watch + from aider.dump import dump + def is_source_file(path: Path) -> bool: """ Check if a file is a source file that uses # or // style comments. @@ -78,10 +80,10 @@ def watch_source_files(directory: str, gitignores: list[str] = None, ignore_func path_obj = Path(path) root_abs = root.resolve() path_abs = path_obj.resolve() - + if not path_abs.is_relative_to(root_abs): return False - + rel_path = path_abs.relative_to(root_abs) if gitignore_spec and gitignore_spec.match_file(str(rel_path)): return False