diff --git a/tests/components/image/test_media_source.py b/tests/components/image/test_media_source.py index 2037641a1a3..73cc76b9fb7 100644 --- a/tests/components/image/test_media_source.py +++ b/tests/components/image/test_media_source.py @@ -8,7 +8,7 @@ from homeassistant.setup import async_setup_component @pytest.fixture(autouse=True) -async def setup_media_source(hass): +async def setup_media_source(hass: HomeAssistant) -> None: """Set up media source.""" assert await async_setup_component(hass, "media_source", {}) diff --git a/tests/components/ios/test_init.py b/tests/components/ios/test_init.py index afefec1530c..ddf5835a1be 100644 --- a/tests/components/ios/test_init.py +++ b/tests/components/ios/test_init.py @@ -19,7 +19,7 @@ def mock_load_json(): @pytest.fixture(autouse=True) -def mock_dependencies(hass): +def mock_dependencies(hass: HomeAssistant) -> None: """Mock dependencies loaded.""" mock_component(hass, "zeroconf") mock_component(hass, "device_tracker") diff --git a/tests/components/mobile_app/conftest.py b/tests/components/mobile_app/conftest.py index 657b80a759a..9f0681d41f7 100644 --- a/tests/components/mobile_app/conftest.py +++ b/tests/components/mobile_app/conftest.py @@ -67,7 +67,7 @@ async def webhook_client( @pytest.fixture(autouse=True) -async def setup_ws(hass): +async def setup_ws(hass: HomeAssistant) -> None: """Configure the websocket_api component.""" assert await async_setup_component(hass, "repairs", {}) assert await async_setup_component(hass, "websocket_api", {}) diff --git a/tests/components/mold_indicator/test_sensor.py b/tests/components/mold_indicator/test_sensor.py index 760d82dfedc..2de1d34b403 100644 --- a/tests/components/mold_indicator/test_sensor.py +++ b/tests/components/mold_indicator/test_sensor.py @@ -18,7 +18,7 @@ from homeassistant.setup import async_setup_component @pytest.fixture(autouse=True) -def init_sensors_fixture(hass): +def init_sensors_fixture(hass: HomeAssistant) -> None: """Set up things to be run when tests are started.""" hass.states.async_set( "test.indoortemp", "20", {ATTR_UNIT_OF_MEASUREMENT: UnitOfTemperature.CELSIUS} diff --git a/tests/components/nest/conftest.py b/tests/components/nest/conftest.py index 4c78bf4c27b..4b64e80543b 100644 --- a/tests/components/nest/conftest.py +++ b/tests/components/nest/conftest.py @@ -109,7 +109,7 @@ async def auth(aiohttp_client: ClientSessionGenerator) -> FakeAuth: @pytest.fixture(autouse=True) -def cleanup_media_storage(hass): +def cleanup_media_storage(hass: HomeAssistant) -> Generator[None]: """Test cleanup, remove any media storage persisted during the test.""" tmp_path = str(uuid.uuid4()) with patch("homeassistant.components.nest.media_source.MEDIA_PATH", new=tmp_path): diff --git a/tests/components/onboarding/test_views.py b/tests/components/onboarding/test_views.py index 3b6e6f5dbe3..dd53d6cbce6 100644 --- a/tests/components/onboarding/test_views.py +++ b/tests/components/onboarding/test_views.py @@ -28,7 +28,7 @@ from tests.typing import ClientSessionGenerator @pytest.fixture(autouse=True) -def auth_active(hass): +def auth_active(hass: HomeAssistant) -> None: """Ensure auth is always active.""" hass.loop.run_until_complete( register_auth_provider(hass, {"type": "homeassistant"}) diff --git a/tests/components/persistent_notification/conftest.py b/tests/components/persistent_notification/conftest.py index d665c0075b3..29ba5a6008a 100644 --- a/tests/components/persistent_notification/conftest.py +++ b/tests/components/persistent_notification/conftest.py @@ -3,10 +3,11 @@ import pytest import homeassistant.components.persistent_notification as pn +from homeassistant.core import HomeAssistant from homeassistant.setup import async_setup_component @pytest.fixture(autouse=True) -async def setup_integration(hass): +async def setup_integration(hass: HomeAssistant) -> None: """Set up persistent notification integration.""" assert await async_setup_component(hass, pn.DOMAIN, {}) diff --git a/tests/components/pilight/test_sensor.py b/tests/components/pilight/test_sensor.py index 97e031736e5..9f529117642 100644 --- a/tests/components/pilight/test_sensor.py +++ b/tests/components/pilight/test_sensor.py @@ -12,7 +12,7 @@ from tests.common import assert_setup_component, mock_component @pytest.fixture(autouse=True) -def setup_comp(hass): +def setup_comp(hass: HomeAssistant) -> None: """Initialize components.""" mock_component(hass, "pilight") diff --git a/tests/components/repairs/test_websocket_api.py b/tests/components/repairs/test_websocket_api.py index 60d0364b985..dcc6932cf4a 100644 --- a/tests/components/repairs/test_websocket_api.py +++ b/tests/components/repairs/test_websocket_api.py @@ -115,7 +115,7 @@ class MockFixFlowAbort(RepairsFlow): @pytest.fixture(autouse=True) -async def mock_repairs_integration(hass): +async def mock_repairs_integration(hass: HomeAssistant) -> None: """Mock a repairs integration.""" hass.config.components.add("fake_integration") diff --git a/tests/components/stream/test_recorder.py b/tests/components/stream/test_recorder.py index c2229219422..8e079cded45 100644 --- a/tests/components/stream/test_recorder.py +++ b/tests/components/stream/test_recorder.py @@ -35,7 +35,7 @@ from tests.common import async_fire_time_changed @pytest.fixture(autouse=True) -async def stream_component(hass): +async def stream_component(hass: HomeAssistant) -> None: """Set up the component before each test.""" await async_setup_component(hass, "stream", {"stream": {}}) diff --git a/tests/components/stream/test_worker.py b/tests/components/stream/test_worker.py index 7226adc7d7e..a96866eac4b 100644 --- a/tests/components/stream/test_worker.py +++ b/tests/components/stream/test_worker.py @@ -83,7 +83,7 @@ def filename(tmp_path: Path) -> str: @pytest.fixture(autouse=True) -def mock_stream_settings(hass): +def mock_stream_settings(hass: HomeAssistant) -> None: """Set the stream settings data in hass before each test.""" hass.data[DOMAIN] = { ATTR_SETTINGS: StreamSettings( diff --git a/tests/components/sun/test_trigger.py b/tests/components/sun/test_trigger.py index a68162048ff..303ca3b80cd 100644 --- a/tests/components/sun/test_trigger.py +++ b/tests/components/sun/test_trigger.py @@ -27,7 +27,7 @@ def stub_blueprint_populate_autouse(stub_blueprint_populate: None) -> None: @pytest.fixture(autouse=True) -def setup_comp(hass): +def setup_comp(hass: HomeAssistant) -> None: """Initialize components.""" mock_component(hass, "group") hass.loop.run_until_complete( diff --git a/tests/components/traccar/test_init.py b/tests/components/traccar/test_init.py index feacbb7b13f..b25ab6a0a34 100644 --- a/tests/components/traccar/test_init.py +++ b/tests/components/traccar/test_init.py @@ -45,7 +45,7 @@ async def traccar_client( @pytest.fixture(autouse=True) -async def setup_zones(hass): +async def setup_zones(hass: HomeAssistant) -> None: """Set up Zone config in HA.""" assert await async_setup_component( hass, diff --git a/tests/components/webhook/test_trigger.py b/tests/components/webhook/test_trigger.py index 37aae47dd14..2963db70ad4 100644 --- a/tests/components/webhook/test_trigger.py +++ b/tests/components/webhook/test_trigger.py @@ -17,7 +17,7 @@ def stub_blueprint_populate_autouse(stub_blueprint_populate: None) -> None: @pytest.fixture(autouse=True) -async def setup_http(hass): +async def setup_http(hass: HomeAssistant) -> None: """Set up http.""" assert await async_setup_component(hass, "http", {}) assert await async_setup_component(hass, "webhook", {}) diff --git a/tests/components/zone/test_trigger.py b/tests/components/zone/test_trigger.py index e80cee82eee..a28b3c0592a 100644 --- a/tests/components/zone/test_trigger.py +++ b/tests/components/zone/test_trigger.py @@ -17,7 +17,7 @@ def stub_blueprint_populate_autouse(stub_blueprint_populate: None) -> None: @pytest.fixture(autouse=True) -def setup_comp(hass): +def setup_comp(hass: HomeAssistant) -> None: """Initialize components.""" mock_component(hass, "group") hass.loop.run_until_complete(