Import Generator from typing_extensions (1) (#118986)

This commit is contained in:
Marc Mueller
2024-06-06 17:02:13 +02:00
committed by GitHub
parent 69708db8e0
commit fe21e2b8ba
34 changed files with 134 additions and 118 deletions

View File

@@ -1,13 +1,13 @@
"""Common fixtures for the NEW_NAME tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
@pytest.fixture
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
def mock_setup_entry() -> Generator[AsyncMock]:
"""Override async_setup_entry."""
with patch(
"homeassistant.components.NEW_DOMAIN.async_setup_entry", return_value=True

View File

@@ -1,13 +1,13 @@
"""Common fixtures for the NEW_NAME tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from typing_extensions import Generator
@pytest.fixture
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
def mock_setup_entry() -> Generator[AsyncMock]:
"""Override async_setup_entry."""
with patch(
"homeassistant.components.NEW_DOMAIN.async_setup_entry", return_value=True