From 17f35cde19cf05b1e3c9de8c9205143587d281e1 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 6 Feb 2025 08:43:26 -0800 Subject: [PATCH] refactor: Move MinimalCoder class definition to module level in test_watch.py --- tests/basic/test_watch.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/basic/test_watch.py b/tests/basic/test_watch.py index 204fa6b8c..17a2f3414 100644 --- a/tests/basic/test_watch.py +++ b/tests/basic/test_watch.py @@ -4,6 +4,16 @@ from aider.io import InputOutput from aider.watch import FileWatcher +class MinimalCoder: + def __init__(self, io): + self.io = io + self.root = "." + self.abs_fnames = set() + + def get_rel_fname(self, fname): + return fname + + def test_gitignore_patterns(): """Test that gitignore patterns are properly loaded and matched""" from pathlib import Path @@ -102,15 +112,6 @@ def test_handle_changes(): def test_ai_comment_pattern(): # Create minimal IO and Coder instances for testing - class MinimalCoder: - def __init__(self, io): - self.io = io - self.root = "." - self.abs_fnames = set() - - def get_rel_fname(self, fname): - return fname - io = InputOutput(pretty=False, fancy_input=False, yes=False) coder = MinimalCoder(io) watcher = FileWatcher(coder)