diff --git a/features/steps/anthropic_provider_steps.py b/features/steps/anthropic_provider_steps.py index 961242949..65f88e9f6 100644 --- a/features/steps/anthropic_provider_steps.py +++ b/features/steps/anthropic_provider_steps.py @@ -153,7 +153,9 @@ def step_stream_plan_generation(context): 'the Anthropic provider should construct ChatAnthropic with api key "{api_key}" and model "{model_id}"' ) def step_assert_chat_anthropic_constructor(context, api_key, model_id): - assert context.chat_anthropic_call is not None, "ChatAnthropic should have been called" + assert context.chat_anthropic_call is not None, ( + "ChatAnthropic should have been called" + ) call_args, call_kwargs = context.chat_anthropic_call assert call_args == (), "ChatAnthropic should be called with keyword arguments" assert call_kwargs["api_key"] == api_key @@ -170,7 +172,9 @@ def step_assert_chat_anthropic_constructor(context, api_key, model_id): 'the Anthropic provider should include kwargs "{kwargs_string}" in the ChatAnthropic call' ) def step_assert_chat_anthropic_kwargs(context, kwargs_string): - assert context.chat_anthropic_call is not None, "ChatAnthropic should have been called" + assert context.chat_anthropic_call is not None, ( + "ChatAnthropic should have been called" + ) _, call_kwargs = context.chat_anthropic_call expected_kwargs = _parse_kwargs_string(kwargs_string) for key, value in expected_kwargs.items(): @@ -193,7 +197,9 @@ def step_assert_provider_metadata(context, expected_name, expected_model): assert response.model_used == expected_model -@then("the Anthropic provider response should report the requested model without errors") +@then( + "the Anthropic provider response should report the requested model without errors" +) def step_assert_placeholder_metadata(context): assert context.response is not None assert context.response.model_used == context.provider.model_id @@ -262,4 +268,6 @@ def step_assert_anthropic_provider_error(context, message): def step_assert_anthropic_supports_streaming(context): provider = getattr(context, "provider", None) assert provider is not None, "Provider should exist" - assert provider._supports_streaming is True, "Anthropic provider should support streaming" + assert provider._supports_streaming is True, ( + "Anthropic provider should support streaming" + ) diff --git a/features/steps/consolidated_ai_models_providers_steps.py b/features/steps/consolidated_ai_models_providers_steps.py index 737ac1c80..1e1bffac7 100644 --- a/features/steps/consolidated_ai_models_providers_steps.py +++ b/features/steps/consolidated_ai_models_providers_steps.py @@ -55,7 +55,9 @@ def step_create_anthropic_provider_with_custom_overrides(context, api_key, model @then("the Anthropic provider should apply the custom overrides to ChatAnthropic") def step_assert_anthropic_custom_overrides(context): - assert context.chat_anthropic_call is not None, "ChatAnthropic should have been called" + assert context.chat_anthropic_call is not None, ( + "ChatAnthropic should have been called" + ) _, call_kwargs = context.chat_anthropic_call overrides = getattr(context, "anthropic_custom_overrides", {}) for key, value in overrides.items(): diff --git a/features/steps/google_provider_steps.py b/features/steps/google_provider_steps.py index 1c8288040..a799329b2 100644 --- a/features/steps/google_provider_steps.py +++ b/features/steps/google_provider_steps.py @@ -90,9 +90,7 @@ def step_set_google_provider_kwargs(context, kwargs_string): @given( 'I create a Google chat provider with API key "{api_key}" and model "{model_id}"' ) -@when( - 'I create a Google chat provider with API key "{api_key}" and model "{model_id}"' -) +@when('I create a Google chat provider with API key "{api_key}" and model "{model_id}"') def step_create_google_provider(context, api_key, model_id): patcher = patch("cleveragents.providers.llm.google_provider.ChatGoogleGenerativeAI") context.chat_google_patcher = patcher @@ -156,9 +154,13 @@ def step_stream_plan_generation(context): 'the Google provider should construct ChatGoogleGenerativeAI with api key "{api_key}" and model "{model_id}"' ) def step_assert_chat_google_constructor(context, api_key, model_id): - assert context.chat_google_call is not None, "ChatGoogleGenerativeAI should have been called" + assert context.chat_google_call is not None, ( + "ChatGoogleGenerativeAI should have been called" + ) call_args, call_kwargs = context.chat_google_call - assert call_args == (), "ChatGoogleGenerativeAI should be called with keyword arguments" + assert call_args == (), ( + "ChatGoogleGenerativeAI should be called with keyword arguments" + ) assert call_kwargs["api_key"] == api_key assert call_kwargs["model"] == model_id @@ -173,7 +175,9 @@ def step_assert_chat_google_constructor(context, api_key, model_id): 'the Google provider should include kwargs "{kwargs_string}" in the ChatGoogleGenerativeAI call' ) def step_assert_chat_google_kwargs(context, kwargs_string): - assert context.chat_google_call is not None, "ChatGoogleGenerativeAI should have been called" + assert context.chat_google_call is not None, ( + "ChatGoogleGenerativeAI should have been called" + ) _, call_kwargs = context.chat_google_call expected_kwargs = _parse_kwargs_string(kwargs_string) for key, value in expected_kwargs.items(): @@ -265,4 +269,6 @@ def step_assert_google_provider_error(context, message): def step_assert_google_supports_streaming(context): provider = getattr(context, "provider", None) assert provider is not None, "Provider should exist" - assert provider._supports_streaming is True, "Google provider should support streaming" + assert provider._supports_streaming is True, ( + "Google provider should support streaming" + )