diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index 46b3717aa2c..b30fa54de78 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -91,7 +91,12 @@ _METHOD_MATCH: list[TypeHintMatch] = [ ] _TEST_FIXTURES: dict[str, list[str] | str] = { + "aioclient_mock": "AiohttpClientMocker", + "aiohttp_client": "ClientSessionGenerator", "caplog": "pytest.LogCaptureFixture", + "hass_client": "ClientSessionGenerator", + "hass_client_no_auth": "ClientSessionGenerator", + "hass_ws_client": "WebSocketGenerator", "mqtt_client_mock": "MqttMockPahoClient", "mqtt_mock": "MqttMockHAClient", "mqtt_mock_entry_no_yaml_config": "MqttMockHAClientGenerator", diff --git a/tests/conftest.py b/tests/conftest.py index 88f22427bae..410cc4f1303 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -77,7 +77,10 @@ from .common import ( # noqa: E402, isort:skip init_recorder_component, mock_storage, ) -from .test_util.aiohttp import mock_aiohttp_client # noqa: E402, isort:skip +from .test_util.aiohttp import ( # noqa: E402, isort:skip + AiohttpClientMocker, + mock_aiohttp_client, +) _LOGGER = logging.getLogger(__name__) @@ -475,7 +478,7 @@ def requests_mock(): @pytest.fixture -def aioclient_mock(): +def aioclient_mock() -> Generator[AiohttpClientMocker, None, None]: """Fixture to mock aioclient calls.""" with mock_aiohttp_client() as mock_session: yield mock_session