From 9d516dd4719debe34921e2c1abcbbabb32593e10 Mon Sep 17 00:00:00 2001 From: jbouwh Date: Thu, 6 Jun 2024 21:02:31 +0000 Subject: [PATCH] Use typing_extensions Generator --- tests/components/mqtt/conftest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/components/mqtt/conftest.py b/tests/components/mqtt/conftest.py index 9e82bbbbf7e6d2..f866445d218efd 100644 --- a/tests/components/mqtt/conftest.py +++ b/tests/components/mqtt/conftest.py @@ -1,10 +1,10 @@ """Test fixtures for mqtt component.""" -from collections.abc import Generator from random import getrandbits from unittest.mock import AsyncMock, patch import pytest +from typing_extensions import Generator from tests.components.light.conftest import mock_light_profiles # noqa: F401 @@ -21,7 +21,7 @@ def temp_dir_prefix() -> str: @pytest.fixture -def mock_temp_dir(temp_dir_prefix: str) -> Generator[None, None, str]: +def mock_temp_dir(temp_dir_prefix: str) -> Generator[str]: """Mock the certificate temp directory.""" with patch( # Patch temp dir name to avoid tests fail running in parallel @@ -32,7 +32,7 @@ def mock_temp_dir(temp_dir_prefix: str) -> Generator[None, None, str]: @pytest.fixture -def tag_mock() -> Generator[AsyncMock, None, None]: +def tag_mock() -> Generator[AsyncMock]: """Fixture to mock tag.""" with patch("homeassistant.components.tag.async_scan_tag") as mock_tag: yield mock_tag