style: Apply linter formatting changes

This commit is contained in:
Paul Gauthier (aider) 2024-08-14 09:53:48 -07:00
parent db22d298e3
commit 81ed9c3002

View file

@ -226,9 +226,10 @@ class TestMain(TestCase):
def test_main_exit_calls_version_check(self):
with GitTemporaryDirectory():
with patch("aider.main.check_version") as mock_check_version, patch(
"aider.main.InputOutput"
) as mock_input_output:
with (
patch("aider.main.check_version") as mock_check_version,
patch("aider.main.InputOutput") as mock_input_output,
):
main(["--exit"], input=DummyInput(), output=DummyOutput())
mock_check_version.assert_called_once()
mock_input_output.assert_called_once()
@ -398,9 +399,10 @@ class TestMain(TestCase):
cwd_config.write_text("model: gpt-4-32k\nmap-tokens: 4096\n")
named_config.write_text("model: gpt-4-1106-preview\nmap-tokens: 8192\n")
with patch("pathlib.Path.home", return_value=fake_home), \
patch("aider.coders.Coder.create") as MockCoder:
with (
patch("pathlib.Path.home", return_value=fake_home),
patch("aider.coders.Coder.create") as MockCoder,
):
# Test loading from current working directory
main(["--yes", "--exit"], input=DummyInput(), output=DummyOutput())
_, kwargs = MockCoder.call_args
@ -422,7 +424,11 @@ class TestMain(TestCase):
self.assertEqual(kwargs["map_tokens"], 1024)
# Test loading from specified config file
main(["--yes", "--exit", "--config", str(named_config)], input=DummyInput(), output=DummyOutput())
main(
["--yes", "--exit", "--config", str(named_config)],
input=DummyInput(),
output=DummyOutput(),
)
_, kwargs = MockCoder.call_args
self.assertEqual(kwargs["model"], "gpt-4-1106-preview")
self.assertEqual(kwargs["map_tokens"], 8192)