diff --git a/tests/components/calendar/test_init.py b/tests/components/calendar/test_init.py index cccc960939e..4ad5e11b8e4 100644 --- a/tests/components/calendar/test_init.py +++ b/tests/components/calendar/test_init.py @@ -23,7 +23,7 @@ from tests.typing import ClientSessionGenerator, WebSocketGenerator @pytest.fixture(name="frozen_time") -def mock_frozen_time() -> None: +def mock_frozen_time() -> str | None: """Fixture to set a frozen time used in tests. This is needed so that it can run before other fixtures. @@ -32,7 +32,7 @@ def mock_frozen_time() -> None: @pytest.fixture(autouse=True) -def mock_set_frozen_time(frozen_time: Any) -> Generator[None]: +def mock_set_frozen_time(frozen_time: str | None) -> Generator[None]: """Fixture to freeze time that also can work for other fixtures.""" if not frozen_time: yield @@ -44,9 +44,9 @@ def mock_set_frozen_time(frozen_time: Any) -> Generator[None]: @pytest.fixture(name="setup_platform", autouse=True) async def mock_setup_platform( hass: HomeAssistant, - set_time_zone: Any, - frozen_time: Any, - mock_setup_integration: Any, + set_time_zone: None, + frozen_time: str | None, + mock_setup_integration: None, config_entry: MockConfigEntry, ) -> None: """Fixture to setup platforms used in the test and fixtures are set up in the right order.""" diff --git a/tests/components/calendar/test_recorder.py b/tests/components/calendar/test_recorder.py index aeddebc226c..c7511b8b2b0 100644 --- a/tests/components/calendar/test_recorder.py +++ b/tests/components/calendar/test_recorder.py @@ -1,7 +1,6 @@ """The tests for calendar recorder.""" from datetime import timedelta -from typing import Any import pytest @@ -19,7 +18,7 @@ from tests.components.recorder.common import async_wait_recording_done async def mock_setup_dependencies( recorder_mock: Recorder, hass: HomeAssistant, - set_time_zone: Any, + set_time_zone: None, mock_setup_integration: None, config_entry: MockConfigEntry, ) -> None: diff --git a/tests/components/calendar/test_trigger.py b/tests/components/calendar/test_trigger.py index 7e3136237c0..dfe4622e82e 100644 --- a/tests/components/calendar/test_trigger.py +++ b/tests/components/calendar/test_trigger.py @@ -84,9 +84,7 @@ class FakeSchedule: @pytest.fixture -def fake_schedule( - hass: HomeAssistant, freezer: FrozenDateTimeFactory -) -> Generator[FakeSchedule]: +def fake_schedule(hass: HomeAssistant, freezer: FrozenDateTimeFactory) -> FakeSchedule: """Fixture that tests can use to make fake events.""" # Setup start time for all tests @@ -104,7 +102,7 @@ def mock_test_entity(test_entities: list[MockCalendarEntity]) -> MockCalendarEnt @pytest.fixture(name="setup_platform", autouse=True) async def mock_setup_platform( hass: HomeAssistant, - mock_setup_integration: Any, + mock_setup_integration: None, config_entry: MockConfigEntry, ) -> None: """Fixture to setup platforms used in the test."""