From d0e85d9c2c053a1679cf78f046ef021bcf04dc7a Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 8 Nov 2024 10:02:54 -0800 Subject: [PATCH] style: Apply linter formatting to sendchat.py and test_sendchat.py --- aider/sendchat.py | 2 +- tests/basic/test_sendchat.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/aider/sendchat.py b/aider/sendchat.py index 745d10ebb..7414243c2 100644 --- a/aider/sendchat.py +++ b/aider/sendchat.py @@ -71,7 +71,7 @@ def simple_send_with_retries(model_name, messages, extra_params=None): } _hash, response = send_completion(**kwargs) - if not response or not hasattr(response, 'choices') or not response.choices: + if not response or not hasattr(response, "choices") or not response.choices: return None return response.choices[0].message.content except litellm_ex.exceptions_tuple() as err: diff --git a/tests/basic/test_sendchat.py b/tests/basic/test_sendchat.py index 2d953e06d..7bc1751e3 100644 --- a/tests/basic/test_sendchat.py +++ b/tests/basic/test_sendchat.py @@ -85,9 +85,7 @@ class TestSendChat(unittest.TestCase): mock.status_code = 400 mock_completion.side_effect = litellm.InvalidRequestError( - message="Invalid request", - llm_provider="test_provider", - model="test_model" + message="Invalid request", llm_provider="test_provider", model="test_model" ) result = simple_send_with_retries(self.mock_model, self.mock_messages)