From e0aadbd9611efb95cec608458a33e9d4d6801b2d Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 19 Nov 2024 11:50:01 -0800 Subject: [PATCH] style: Format code with linter and improve readability --- tests/basic/test_models.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/basic/test_models.py b/tests/basic/test_models.py index 9e56d244f..14772ee6f 100644 --- a/tests/basic/test_models.py +++ b/tests/basic/test_models.py @@ -82,7 +82,9 @@ class TestModels(unittest.TestCase): ) # Should return True because there's a problem with the editor model mock_io.tool_warning.assert_called_with(ANY) # Ensure a warning was issued - warning_messages = [warning_call.args[0] for warning_call in mock_io.tool_warning.call_args_list] + warning_messages = [ + warning_call.args[0] for warning_call in mock_io.tool_warning.call_args_list + ] print("Warning messages:", warning_messages) # Add this line self.assertGreaterEqual(mock_io.tool_warning.call_count, 1) # Expect two warnings @@ -92,6 +94,7 @@ class TestModels(unittest.TestCase): def test_default_and_override_settings(self): import tempfile + import yaml # Create temporary YAML file with test settings @@ -104,13 +107,13 @@ class TestModels(unittest.TestCase): { "name": "aider/override", "use_temperature": False, - } + }, ] - with tempfile.NamedTemporaryFile(mode='w', suffix='.yml') as tmp: + with tempfile.NamedTemporaryFile(mode="w", suffix=".yml") as tmp: yaml.dump(test_settings, tmp) tmp.flush() - + # Register the test settings register_models([tmp.name])