diff --git a/homeassistant/components/google_generative_ai_conversation/__init__.py b/homeassistant/components/google_generative_ai_conversation/__init__.py index a522eeab5cd..73450e9f5b9 100644 --- a/homeassistant/components/google_generative_ai_conversation/__init__.py +++ b/homeassistant/components/google_generative_ai_conversation/__init__.py @@ -63,7 +63,9 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: for image_filename in image_filenames: if not hass.config.is_allowed_path(image_filename): raise HomeAssistantError( - f"Cannot read `{image_filename}`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml`" + f"Cannot read `{image_filename}`, no access to path; " + "`allowlist_external_dirs` may need to be adjusted in " + "`configuration.yaml`" ) if not Path(image_filename).exists(): raise HomeAssistantError(f"`{image_filename}` does not exist") diff --git a/tests/components/google_generative_ai_conversation/test_init.py b/tests/components/google_generative_ai_conversation/test_init.py index 380d5e82638..eee00fadfac 100644 --- a/tests/components/google_generative_ai_conversation/test_init.py +++ b/tests/components/google_generative_ai_conversation/test_init.py @@ -163,7 +163,7 @@ async def test_generate_content_service_without_images( """Test generate content service.""" stubbed_generated_content = ( "I'm thrilled to welcome you all to the release " - + "party for the latest version of Home Assistant!" + "party for the latest version of Home Assistant!" ) with patch("google.generativeai.GenerativeModel") as mock_model: @@ -257,7 +257,11 @@ async def test_generate_content_service_with_image_not_allowed_path( hass.config, "is_allowed_path", return_value=False ), pytest.raises( HomeAssistantError, - match="Cannot read `doorbell_snapshot.jpg`, no access to path; `allowlist_external_dirs` may need to be adjusted in `configuration.yaml`", + match=( + "Cannot read `doorbell_snapshot.jpg`, no access to path; " + "`allowlist_external_dirs` may need to be adjusted in " + "`configuration.yaml`" + ), ): await hass.services.async_call( "google_generative_ai_conversation",