diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index 58baeb6d1cd..bd208808366 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -138,6 +138,7 @@ _TEST_FIXTURES: dict[str, list[str] | str] = { "mock_bleak_scanner_start": "MagicMock", "mock_bluetooth": "None", "mock_bluetooth_adapters": "None", + "mock_conversation_agent": "MockAgent", "mock_device_tracker_conf": "list[Device]", "mock_get_source_ip": "_patch", "mock_hass_config": "None", diff --git a/tests/components/conversation/conftest.py b/tests/components/conversation/conftest.py index 4801e506460..6575ab2ac98 100644 --- a/tests/components/conversation/conftest.py +++ b/tests/components/conversation/conftest.py @@ -16,7 +16,7 @@ from tests.common import MockConfigEntry @pytest.fixture -def mock_agent_support_all(hass: HomeAssistant): +def mock_agent_support_all(hass: HomeAssistant) -> MockAgent: """Mock agent that supports all languages.""" entry = MockConfigEntry(entry_id="mock-entry-support-all") entry.add_to_hass(hass) diff --git a/tests/components/conversation/test_init.py b/tests/components/conversation/test_init.py index e1e6683f142..415c80fffbc 100644 --- a/tests/components/conversation/test_init.py +++ b/tests/components/conversation/test_init.py @@ -24,7 +24,7 @@ from homeassistant.helpers import ( ) from homeassistant.setup import async_setup_component -from . import expose_entity, expose_new +from . import MockAgent, expose_entity, expose_new from tests.common import ( MockConfigEntry, @@ -94,7 +94,7 @@ async def test_http_processing_intent_target_ha_agent( init_components, hass_client: ClientSessionGenerator, hass_admin_user: MockUser, - mock_conversation_agent, + mock_conversation_agent: MockAgent, entity_registry: er.EntityRegistry, snapshot: SnapshotAssertion, ) -> None: @@ -663,7 +663,7 @@ async def test_custom_agent( hass: HomeAssistant, hass_client: ClientSessionGenerator, hass_admin_user: MockUser, - mock_conversation_agent, + mock_conversation_agent: MockAgent, snapshot: SnapshotAssertion, ) -> None: """Test a custom conversation agent.""" @@ -1081,8 +1081,8 @@ async def test_agent_id_validator_invalid_agent( async def test_get_agent_list( hass: HomeAssistant, init_components, - mock_conversation_agent, - mock_agent_support_all, + mock_conversation_agent: MockAgent, + mock_agent_support_all: MockAgent, hass_ws_client: WebSocketGenerator, snapshot: SnapshotAssertion, ) -> None: @@ -1139,7 +1139,7 @@ async def test_get_agent_list( async def test_get_agent_info( hass: HomeAssistant, init_components, - mock_conversation_agent, + mock_conversation_agent: MockAgent, snapshot: SnapshotAssertion, ) -> None: """Test get agent info.""" diff --git a/tests/components/mobile_app/test_webhook.py b/tests/components/mobile_app/test_webhook.py index a9346e3728c..9f521cafd38 100644 --- a/tests/components/mobile_app/test_webhook.py +++ b/tests/components/mobile_app/test_webhook.py @@ -24,6 +24,7 @@ from homeassistant.setup import async_setup_component from .const import CALL_SERVICE, FIRE_EVENT, REGISTER_CLEARTEXT, RENDER_TEMPLATE, UPDATE from tests.common import async_capture_events, async_mock_service +from tests.components.conversation import MockAgent @pytest.fixture @@ -1023,7 +1024,7 @@ async def test_webhook_handle_conversation_process( homeassistant, create_registrations, webhook_client, - mock_conversation_agent, + mock_conversation_agent: MockAgent, ) -> None: """Test that we can converse.""" webhook_client.server.app.router._frozen = False