Use TypeVar defaults for Generator (#125228)

This commit is contained in:
Marc Mueller
2024-09-05 06:10:21 +02:00
committed by GitHub
parent fbd3bf7a98
commit c8fd48523f
6 changed files with 16 additions and 20 deletions

View File

@@ -39,14 +39,14 @@ def platforms() -> list[Platform]:
@pytest.fixture(autouse=True)
async def mock_patch_platforms(platforms: list[str]) -> AsyncGenerator[None, None]:
async def mock_patch_platforms(platforms: list[str]) -> AsyncGenerator[None]:
"""Fixture to set up platforms for tests."""
with patch(f"homeassistant.components.{DOMAIN}.PLATFORMS", platforms):
yield
@pytest.fixture
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
def mock_setup_entry() -> Generator[AsyncMock]:
"""Override async_setup_entry."""
with patch(
"homeassistant.components.smlight.async_setup_entry", return_value=True