diff --git a/tests/components/abode/conftest.py b/tests/components/abode/conftest.py index 21b236540d0..097eb568d4a 100644 --- a/tests/components/abode/conftest.py +++ b/tests/components/abode/conftest.py @@ -1,11 +1,11 @@ """Configuration for Abode tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch from jaraco.abode.helpers import urls as URL import pytest from requests_mock import Mocker -from typing_extensions import Generator from tests.common import load_fixture from tests.components.light.conftest import mock_light_profiles # noqa: F401 diff --git a/tests/components/accuweather/conftest.py b/tests/components/accuweather/conftest.py index 3b0006068ea..737fd3f84b6 100644 --- a/tests/components/accuweather/conftest.py +++ b/tests/components/accuweather/conftest.py @@ -1,9 +1,9 @@ """Common fixtures for the AccuWeather tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.accuweather.const import DOMAIN diff --git a/tests/components/aemet/conftest.py b/tests/components/aemet/conftest.py index aa4f537c7fb..38f4793541c 100644 --- a/tests/components/aemet/conftest.py +++ b/tests/components/aemet/conftest.py @@ -1,9 +1,9 @@ """Test fixtures for aemet.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/aftership/conftest.py b/tests/components/aftership/conftest.py index 1704b099cc2..d66ae267bfe 100644 --- a/tests/components/aftership/conftest.py +++ b/tests/components/aftership/conftest.py @@ -1,9 +1,9 @@ """Common fixtures for the AfterShip tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/agent_dvr/conftest.py b/tests/components/agent_dvr/conftest.py index a62e1738850..0ce1c008a23 100644 --- a/tests/components/agent_dvr/conftest.py +++ b/tests/components/agent_dvr/conftest.py @@ -1,9 +1,9 @@ """Test fixtures for Agent DVR.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/airgradient/conftest.py b/tests/components/airgradient/conftest.py index 7ca1198ce5f..a6ee85ecbdd 100644 --- a/tests/components/airgradient/conftest.py +++ b/tests/components/airgradient/conftest.py @@ -1,10 +1,10 @@ """AirGradient tests configuration.""" +from collections.abc import Generator from unittest.mock import patch from airgradient import Config, Measures import pytest -from typing_extensions import Generator from homeassistant.components.airgradient.const import DOMAIN from homeassistant.const import CONF_HOST diff --git a/tests/components/airnow/conftest.py b/tests/components/airnow/conftest.py index 676595250f1..c5d23fa7289 100644 --- a/tests/components/airnow/conftest.py +++ b/tests/components/airnow/conftest.py @@ -1,10 +1,10 @@ """Define fixtures for AirNow tests.""" +from collections.abc import Generator from typing import Any from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.airnow import DOMAIN from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_RADIUS diff --git a/tests/components/airq/conftest.py b/tests/components/airq/conftest.py index 5df032c0308..a132153a76f 100644 --- a/tests/components/airq/conftest.py +++ b/tests/components/airq/conftest.py @@ -1,9 +1,9 @@ """Test fixtures for air-Q.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/airtouch5/conftest.py b/tests/components/airtouch5/conftest.py index d6d55689f17..ca678258c77 100644 --- a/tests/components/airtouch5/conftest.py +++ b/tests/components/airtouch5/conftest.py @@ -1,9 +1,9 @@ """Common fixtures for the Airtouch 5 tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/airvisual/conftest.py b/tests/components/airvisual/conftest.py index a82dc0ab78c..cc49b60e0d8 100644 --- a/tests/components/airvisual/conftest.py +++ b/tests/components/airvisual/conftest.py @@ -1,10 +1,10 @@ """Define test fixtures for AirVisual.""" +from collections.abc import AsyncGenerator, Generator from typing import Any from unittest.mock import AsyncMock, Mock, patch import pytest -from typing_extensions import AsyncGenerator, Generator from homeassistant.components.airvisual import ( CONF_CITY, diff --git a/tests/components/airvisual_pro/conftest.py b/tests/components/airvisual_pro/conftest.py index d25e9821d91..4acf9188889 100644 --- a/tests/components/airvisual_pro/conftest.py +++ b/tests/components/airvisual_pro/conftest.py @@ -1,10 +1,10 @@ """Define test fixtures for AirVisual Pro.""" +from collections.abc import AsyncGenerator, Generator from typing import Any from unittest.mock import AsyncMock, Mock, patch import pytest -from typing_extensions import AsyncGenerator, Generator from homeassistant.components.airvisual_pro.const import DOMAIN from homeassistant.const import CONF_IP_ADDRESS, CONF_PASSWORD diff --git a/tests/components/aladdin_connect/conftest.py b/tests/components/aladdin_connect/conftest.py index 2c158998f49..8399269b30d 100644 --- a/tests/components/aladdin_connect/conftest.py +++ b/tests/components/aladdin_connect/conftest.py @@ -1,9 +1,9 @@ """Test fixtures for the Aladdin Connect Garage Door integration.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from tests.common import MockConfigEntry diff --git a/tests/components/alarm_control_panel/conftest.py b/tests/components/alarm_control_panel/conftest.py index 620b74dd80e..9c59c9e39c3 100644 --- a/tests/components/alarm_control_panel/conftest.py +++ b/tests/components/alarm_control_panel/conftest.py @@ -1,9 +1,9 @@ """Fixturs for Alarm Control Panel tests.""" +from collections.abc import Generator from unittest.mock import MagicMock import pytest -from typing_extensions import Generator from homeassistant.components.alarm_control_panel import ( DOMAIN as ALARM_CONTROL_PANEL_DOMAIN, diff --git a/tests/components/amberelectric/conftest.py b/tests/components/amberelectric/conftest.py index 9de865fae6c..ce4073db71b 100644 --- a/tests/components/amberelectric/conftest.py +++ b/tests/components/amberelectric/conftest.py @@ -1,9 +1,9 @@ """Provide common Amber fixtures.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/ambient_network/conftest.py b/tests/components/ambient_network/conftest.py index 2900f8ae5fe..9fc001252a0 100644 --- a/tests/components/ambient_network/conftest.py +++ b/tests/components/ambient_network/conftest.py @@ -1,11 +1,11 @@ """Common fixtures for the Ambient Weather Network integration tests.""" +from collections.abc import Generator from typing import Any from unittest.mock import AsyncMock, Mock, patch from aioambient import OpenAPI import pytest -from typing_extensions import Generator from homeassistant.components import ambient_network from homeassistant.core import HomeAssistant diff --git a/tests/components/ambient_station/conftest.py b/tests/components/ambient_station/conftest.py index e4f067108a5..160c05ad996 100644 --- a/tests/components/ambient_station/conftest.py +++ b/tests/components/ambient_station/conftest.py @@ -1,10 +1,10 @@ """Define test fixtures for Ambient PWS.""" +from collections.abc import Generator from typing import Any from unittest.mock import AsyncMock, Mock, patch import pytest -from typing_extensions import Generator from homeassistant.components.ambient_station.const import CONF_APP_KEY, DOMAIN from homeassistant.const import CONF_API_KEY diff --git a/tests/components/analytics_insights/conftest.py b/tests/components/analytics_insights/conftest.py index 75d47c41f4e..fcdda95e9bd 100644 --- a/tests/components/analytics_insights/conftest.py +++ b/tests/components/analytics_insights/conftest.py @@ -1,11 +1,11 @@ """Common fixtures for the Homeassistant Analytics tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest from python_homeassistant_analytics import CurrentAnalytics from python_homeassistant_analytics.models import CustomIntegration, Integration -from typing_extensions import Generator from homeassistant.components.analytics_insights.const import ( CONF_TRACKED_CUSTOM_INTEGRATIONS, diff --git a/tests/components/androidtv/conftest.py b/tests/components/androidtv/conftest.py index befb9db7a8c..a075ed66079 100644 --- a/tests/components/androidtv/conftest.py +++ b/tests/components/androidtv/conftest.py @@ -1,9 +1,9 @@ """Fixtures for the Android TV integration tests.""" +from collections.abc import Generator from unittest.mock import Mock, patch import pytest -from typing_extensions import Generator from . import patchers diff --git a/tests/components/androidtv_remote/conftest.py b/tests/components/androidtv_remote/conftest.py index aa5583927d1..05e40991ff9 100644 --- a/tests/components/androidtv_remote/conftest.py +++ b/tests/components/androidtv_remote/conftest.py @@ -1,10 +1,9 @@ """Fixtures for the Android TV Remote integration tests.""" -from collections.abc import Callable +from collections.abc import Callable, Generator from unittest.mock import AsyncMock, MagicMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.androidtv_remote.const import DOMAIN from homeassistant.config_entries import ConfigEntryState diff --git a/tests/components/aosmith/conftest.py b/tests/components/aosmith/conftest.py index d67ae1ea627..7efbe0c58b2 100644 --- a/tests/components/aosmith/conftest.py +++ b/tests/components/aosmith/conftest.py @@ -1,5 +1,6 @@ """Common fixtures for the A. O. Smith tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch from py_aosmith import AOSmithAPIClient @@ -14,7 +15,6 @@ from py_aosmith.models import ( SupportedOperationModeInfo, ) import pytest -from typing_extensions import Generator from homeassistant.components.aosmith.const import DOMAIN from homeassistant.const import CONF_EMAIL, CONF_PASSWORD diff --git a/tests/components/aosmith/test_sensor.py b/tests/components/aosmith/test_sensor.py index a77e4e4576d..8e6f179c088 100644 --- a/tests/components/aosmith/test_sensor.py +++ b/tests/components/aosmith/test_sensor.py @@ -1,10 +1,10 @@ """Tests for the sensor platform of the A. O. Smith integration.""" +from collections.abc import AsyncGenerator from unittest.mock import patch import pytest from syrupy.assertion import SnapshotAssertion -from typing_extensions import AsyncGenerator from homeassistant.const import Platform from homeassistant.core import HomeAssistant diff --git a/tests/components/aosmith/test_water_heater.py b/tests/components/aosmith/test_water_heater.py index ab4a4a33bca..3cd0de1722a 100644 --- a/tests/components/aosmith/test_water_heater.py +++ b/tests/components/aosmith/test_water_heater.py @@ -1,11 +1,11 @@ """Tests for the water heater platform of the A. O. Smith integration.""" +from collections.abc import AsyncGenerator from unittest.mock import MagicMock, patch from py_aosmith.models import OperationMode import pytest from syrupy.assertion import SnapshotAssertion -from typing_extensions import AsyncGenerator from homeassistant.components.water_heater import ( ATTR_AWAY_MODE, diff --git a/tests/components/apple_tv/conftest.py b/tests/components/apple_tv/conftest.py index 36061924db5..78982a8d51c 100644 --- a/tests/components/apple_tv/conftest.py +++ b/tests/components/apple_tv/conftest.py @@ -1,12 +1,12 @@ """Fixtures for component.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch from pyatv import conf from pyatv.const import PairingRequirement, Protocol from pyatv.support import http import pytest -from typing_extensions import Generator from .common import MockPairingHandler, airplay_service, create_conf, mrp_service diff --git a/tests/components/apple_tv/test_config_flow.py b/tests/components/apple_tv/test_config_flow.py index b8f49e7c8f5..f37042a6f50 100644 --- a/tests/components/apple_tv/test_config_flow.py +++ b/tests/components/apple_tv/test_config_flow.py @@ -1,12 +1,12 @@ """Test config flow.""" +from collections.abc import Generator from ipaddress import IPv4Address, ip_address from unittest.mock import ANY, AsyncMock, MagicMock, Mock, patch from pyatv import exceptions from pyatv.const import PairingRequirement, Protocol import pytest -from typing_extensions import Generator from homeassistant import config_entries from homeassistant.components import zeroconf diff --git a/tests/components/application_credentials/test_init.py b/tests/components/application_credentials/test_init.py index c427b1d07e0..e6fdf568bcc 100644 --- a/tests/components/application_credentials/test_init.py +++ b/tests/components/application_credentials/test_init.py @@ -2,13 +2,12 @@ from __future__ import annotations -from collections.abc import Callable +from collections.abc import Callable, Generator import logging from typing import Any from unittest.mock import AsyncMock, Mock, patch import pytest -from typing_extensions import Generator from homeassistant import config_entries, data_entry_flow from homeassistant.components.application_credentials import ( diff --git a/tests/components/aprs/test_device_tracker.py b/tests/components/aprs/test_device_tracker.py index 4cdff41598f..4142195b0b9 100644 --- a/tests/components/aprs/test_device_tracker.py +++ b/tests/components/aprs/test_device_tracker.py @@ -1,11 +1,11 @@ """Test APRS device tracker.""" +from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import aprslib from aprslib import IS import pytest -from typing_extensions import Generator from homeassistant.components.aprs import device_tracker from homeassistant.core import HomeAssistant diff --git a/tests/components/apsystems/conftest.py b/tests/components/apsystems/conftest.py index cd04346c070..0fc1fb183a8 100644 --- a/tests/components/apsystems/conftest.py +++ b/tests/components/apsystems/conftest.py @@ -1,10 +1,10 @@ """Common fixtures for the APsystems Local API tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch from APsystemsEZ1 import ReturnDeviceInfo, ReturnOutputData import pytest -from typing_extensions import Generator from homeassistant.components.apsystems.const import DOMAIN from homeassistant.const import CONF_IP_ADDRESS diff --git a/tests/components/arcam_fmj/conftest.py b/tests/components/arcam_fmj/conftest.py index 66850933cc7..6c73b5c763a 100644 --- a/tests/components/arcam_fmj/conftest.py +++ b/tests/components/arcam_fmj/conftest.py @@ -1,11 +1,11 @@ """Tests for the arcam_fmj component.""" +from collections.abc import AsyncGenerator from unittest.mock import Mock, patch from arcam.fmj.client import Client from arcam.fmj.state import State import pytest -from typing_extensions import AsyncGenerator from homeassistant.components.arcam_fmj.const import DEFAULT_NAME from homeassistant.components.arcam_fmj.media_player import ArcamFmj diff --git a/tests/components/arcam_fmj/test_config_flow.py b/tests/components/arcam_fmj/test_config_flow.py index 26e93354900..8f80f5e7e04 100644 --- a/tests/components/arcam_fmj/test_config_flow.py +++ b/tests/components/arcam_fmj/test_config_flow.py @@ -1,11 +1,11 @@ """Tests for the Arcam FMJ config flow module.""" +from collections.abc import Generator from dataclasses import replace from unittest.mock import AsyncMock, MagicMock, patch from arcam.fmj.client import ConnectionFailed import pytest -from typing_extensions import Generator from homeassistant.components import ssdp from homeassistant.components.arcam_fmj.config_flow import get_entry_client diff --git a/tests/components/arve/conftest.py b/tests/components/arve/conftest.py index 40a5f98291b..8fc35e37000 100644 --- a/tests/components/arve/conftest.py +++ b/tests/components/arve/conftest.py @@ -1,10 +1,10 @@ """Common fixtures for the Arve tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch from asyncarve import ArveCustomer, ArveDevices, ArveSensPro, ArveSensProData import pytest -from typing_extensions import Generator from homeassistant.components.arve.const import DOMAIN from homeassistant.core import HomeAssistant diff --git a/tests/components/assist_pipeline/conftest.py b/tests/components/assist_pipeline/conftest.py index f19e70a8ec1..c041a54d8fa 100644 --- a/tests/components/assist_pipeline/conftest.py +++ b/tests/components/assist_pipeline/conftest.py @@ -2,13 +2,12 @@ from __future__ import annotations -from collections.abc import AsyncIterable +from collections.abc import AsyncIterable, Generator from pathlib import Path from typing import Any from unittest.mock import AsyncMock import pytest -from typing_extensions import Generator from homeassistant.components import stt, tts, wake_word from homeassistant.components.assist_pipeline import DOMAIN, select as assist_select diff --git a/tests/components/assist_pipeline/test_pipeline.py b/tests/components/assist_pipeline/test_pipeline.py index 3e1e99412d8..45a661c0f07 100644 --- a/tests/components/assist_pipeline/test_pipeline.py +++ b/tests/components/assist_pipeline/test_pipeline.py @@ -1,10 +1,10 @@ """Websocket tests for Voice Assistant integration.""" +from collections.abc import AsyncGenerator from typing import Any from unittest.mock import ANY, patch import pytest -from typing_extensions import AsyncGenerator from homeassistant.components import conversation from homeassistant.components.assist_pipeline.const import DOMAIN diff --git a/tests/components/asterisk_mbox/test_init.py b/tests/components/asterisk_mbox/test_init.py index 4800ada0ec4..d7567ea3286 100644 --- a/tests/components/asterisk_mbox/test_init.py +++ b/tests/components/asterisk_mbox/test_init.py @@ -1,9 +1,9 @@ """Test mailbox.""" +from collections.abc import Generator from unittest.mock import Mock, patch import pytest -from typing_extensions import Generator from homeassistant.components.asterisk_mbox import DOMAIN from homeassistant.core import HomeAssistant diff --git a/tests/components/atag/conftest.py b/tests/components/atag/conftest.py index 83ba3e37aad..63476c4846d 100644 --- a/tests/components/atag/conftest.py +++ b/tests/components/atag/conftest.py @@ -1,10 +1,10 @@ """Provide common Atag fixtures.""" import asyncio +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/aurora/conftest.py b/tests/components/aurora/conftest.py index 916f0925c4a..462203193f2 100644 --- a/tests/components/aurora/conftest.py +++ b/tests/components/aurora/conftest.py @@ -1,9 +1,9 @@ """Common fixtures for the Aurora tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.aurora.const import CONF_THRESHOLD, DOMAIN from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE diff --git a/tests/components/axis/conftest.py b/tests/components/axis/conftest.py index 2f392960b86..da58e9576a8 100644 --- a/tests/components/axis/conftest.py +++ b/tests/components/axis/conftest.py @@ -2,7 +2,7 @@ from __future__ import annotations -from collections.abc import Callable +from collections.abc import Callable, Generator from copy import deepcopy from types import MappingProxyType from typing import Any @@ -11,7 +11,6 @@ from unittest.mock import AsyncMock, patch from axis.rtsp import Signal, State import pytest import respx -from typing_extensions import Generator from homeassistant.components.axis.const import DOMAIN as AXIS_DOMAIN from homeassistant.config_entries import ConfigEntry diff --git a/tests/components/axis/test_hub.py b/tests/components/axis/test_hub.py index a797b3feee6..ff7e6b30cd6 100644 --- a/tests/components/axis/test_hub.py +++ b/tests/components/axis/test_hub.py @@ -1,6 +1,6 @@ """Test Axis device.""" -from collections.abc import Callable +from collections.abc import Callable, Generator from ipaddress import ip_address from types import MappingProxyType from typing import Any @@ -9,7 +9,6 @@ from unittest.mock import ANY, AsyncMock, Mock, call, patch import axis as axislib import pytest -from typing_extensions import Generator from homeassistant.components import axis, zeroconf from homeassistant.components.axis.const import DOMAIN as AXIS_DOMAIN diff --git a/tests/components/azure_data_explorer/conftest.py b/tests/components/azure_data_explorer/conftest.py index 4168021b333..f8915a12ce1 100644 --- a/tests/components/azure_data_explorer/conftest.py +++ b/tests/components/azure_data_explorer/conftest.py @@ -1,12 +1,12 @@ """Test fixtures for Azure Data Explorer.""" +from collections.abc import Generator from datetime import timedelta import logging from typing import Any from unittest.mock import AsyncMock, MagicMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.azure_data_explorer.const import ( CONF_FILTER, diff --git a/tests/components/azure_event_hub/conftest.py b/tests/components/azure_event_hub/conftest.py index a34f2e646f2..b814a845c86 100644 --- a/tests/components/azure_event_hub/conftest.py +++ b/tests/components/azure_event_hub/conftest.py @@ -1,5 +1,6 @@ """Test fixtures for AEH.""" +from collections.abc import AsyncGenerator, Generator from dataclasses import dataclass from datetime import timedelta import logging @@ -8,7 +9,6 @@ from unittest.mock import AsyncMock, MagicMock, patch from azure.eventhub.aio import EventHubProducerClient import pytest -from typing_extensions import AsyncGenerator, Generator from homeassistant.components.azure_event_hub.const import ( CONF_FILTER, diff --git a/tests/components/balboa/conftest.py b/tests/components/balboa/conftest.py index fbdc2f8a759..0bb8b2cd468 100644 --- a/tests/components/balboa/conftest.py +++ b/tests/components/balboa/conftest.py @@ -2,12 +2,11 @@ from __future__ import annotations -from collections.abc import Callable +from collections.abc import Callable, Generator from unittest.mock import AsyncMock, MagicMock, patch from pybalboa.enums import HeatMode, LowHighRange import pytest -from typing_extensions import Generator from homeassistant.core import HomeAssistant diff --git a/tests/components/binary_sensor/test_init.py b/tests/components/binary_sensor/test_init.py index 8f14063e011..ea0ad05a0db 100644 --- a/tests/components/binary_sensor/test_init.py +++ b/tests/components/binary_sensor/test_init.py @@ -1,9 +1,9 @@ """The tests for the Binary sensor component.""" +from collections.abc import Generator from unittest import mock import pytest -from typing_extensions import Generator from homeassistant.components import binary_sensor from homeassistant.config_entries import ConfigEntry, ConfigFlow diff --git a/tests/components/blueprint/common.py b/tests/components/blueprint/common.py index dd59b6df082..037aa38f6cb 100644 --- a/tests/components/blueprint/common.py +++ b/tests/components/blueprint/common.py @@ -1,9 +1,8 @@ """Blueprints test helpers.""" +from collections.abc import Generator from unittest.mock import patch -from typing_extensions import Generator - def stub_blueprint_populate_fixture_helper() -> Generator[None]: """Stub copying the blueprints to the config folder.""" diff --git a/tests/components/bluetooth/conftest.py b/tests/components/bluetooth/conftest.py index 4373ec3f915..93a1c59cba1 100644 --- a/tests/components/bluetooth/conftest.py +++ b/tests/components/bluetooth/conftest.py @@ -1,12 +1,12 @@ """Tests for the bluetooth component.""" +from collections.abc import Generator from unittest.mock import patch from bleak_retry_connector import bleak_manager from dbus_fast.aio import message_bus import habluetooth.util as habluetooth_utils import pytest -from typing_extensions import Generator @pytest.fixture(name="disable_bluez_manager_socket", autouse=True, scope="package") diff --git a/tests/components/bluetooth/test_manager.py b/tests/components/bluetooth/test_manager.py index 4bff7cbe94d..0ac49aa72cd 100644 --- a/tests/components/bluetooth/test_manager.py +++ b/tests/components/bluetooth/test_manager.py @@ -1,5 +1,6 @@ """Tests for the Bluetooth integration manager.""" +from collections.abc import Generator from datetime import timedelta import time from typing import Any @@ -11,7 +12,6 @@ from bluetooth_adapters import AdvertisementHistory # pylint: disable-next=no-name-in-module from habluetooth.advertisement_tracker import TRACKER_BUFFERING_WOBBLE_SECONDS import pytest -from typing_extensions import Generator from homeassistant.components import bluetooth from homeassistant.components.bluetooth import ( diff --git a/tests/components/bmw_connected_drive/conftest.py b/tests/components/bmw_connected_drive/conftest.py index f69763dae77..7581b8c6f76 100644 --- a/tests/components/bmw_connected_drive/conftest.py +++ b/tests/components/bmw_connected_drive/conftest.py @@ -1,11 +1,12 @@ """Fixtures for BMW tests.""" +from collections.abc import Generator + from bimmer_connected.tests import ALL_CHARGING_SETTINGS, ALL_PROFILES, ALL_STATES from bimmer_connected.tests.common import MyBMWMockRouter from bimmer_connected.vehicle import remote_services import pytest import respx -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/braviatv/conftest.py b/tests/components/braviatv/conftest.py index 186f4e12337..b25e8ddf067 100644 --- a/tests/components/braviatv/conftest.py +++ b/tests/components/braviatv/conftest.py @@ -1,9 +1,9 @@ """Test fixtures for Bravia TV.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/bring/conftest.py b/tests/components/bring/conftest.py index 25330c10ba4..6c39c5020f9 100644 --- a/tests/components/bring/conftest.py +++ b/tests/components/bring/conftest.py @@ -1,11 +1,11 @@ """Common fixtures for the Bring! tests.""" +from collections.abc import Generator from typing import cast from unittest.mock import AsyncMock, patch from bring_api.types import BringAuthResponse import pytest -from typing_extensions import Generator from homeassistant.components.bring import DOMAIN from homeassistant.const import CONF_EMAIL, CONF_PASSWORD diff --git a/tests/components/brother/conftest.py b/tests/components/brother/conftest.py index 5fadca5314d..ec6120db5f5 100644 --- a/tests/components/brother/conftest.py +++ b/tests/components/brother/conftest.py @@ -1,11 +1,11 @@ """Test fixtures for brother.""" +from collections.abc import Generator from datetime import UTC, datetime from unittest.mock import AsyncMock, patch from brother import BrotherSensors import pytest -from typing_extensions import Generator from homeassistant.components.brother.const import DOMAIN from homeassistant.const import CONF_HOST, CONF_TYPE diff --git a/tests/components/brottsplatskartan/conftest.py b/tests/components/brottsplatskartan/conftest.py index c10093f18b9..1d0cf236ed9 100644 --- a/tests/components/brottsplatskartan/conftest.py +++ b/tests/components/brottsplatskartan/conftest.py @@ -1,9 +1,9 @@ """Test fixtures for Brottplatskartan.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/brunt/conftest.py b/tests/components/brunt/conftest.py index bfbca238446..1b60db682c3 100644 --- a/tests/components/brunt/conftest.py +++ b/tests/components/brunt/conftest.py @@ -1,9 +1,9 @@ """Configuration for brunt tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/bsblan/conftest.py b/tests/components/bsblan/conftest.py index 224e0e0b157..862f3ae1d0c 100644 --- a/tests/components/bsblan/conftest.py +++ b/tests/components/bsblan/conftest.py @@ -1,10 +1,10 @@ """Fixtures for BSBLAN integration tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch from bsblan import Device, Info, State import pytest -from typing_extensions import Generator from homeassistant.components.bsblan.const import CONF_PASSKEY, DOMAIN from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_USERNAME diff --git a/tests/components/buienradar/conftest.py b/tests/components/buienradar/conftest.py index 7c9027c7715..7872b50d4a9 100644 --- a/tests/components/buienradar/conftest.py +++ b/tests/components/buienradar/conftest.py @@ -1,9 +1,9 @@ """Test fixtures for buienradar2.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/button/test_init.py b/tests/components/button/test_init.py index 583c625e1b2..7df5308e096 100644 --- a/tests/components/button/test_init.py +++ b/tests/components/button/test_init.py @@ -1,11 +1,11 @@ """The tests for the Button component.""" +from collections.abc import Generator from datetime import timedelta from unittest.mock import MagicMock from freezegun.api import FrozenDateTimeFactory import pytest -from typing_extensions import Generator from homeassistant.components.button import ( DOMAIN, diff --git a/tests/components/caldav/test_config_flow.py b/tests/components/caldav/test_config_flow.py index 7c47ea14607..0079e59a931 100644 --- a/tests/components/caldav/test_config_flow.py +++ b/tests/components/caldav/test_config_flow.py @@ -1,11 +1,11 @@ """Test the CalDAV config flow.""" +from collections.abc import Generator from unittest.mock import AsyncMock, Mock, patch from caldav.lib.error import AuthorizationError, DAVError import pytest import requests -from typing_extensions import Generator from homeassistant import config_entries from homeassistant.components.caldav.const import DOMAIN diff --git a/tests/components/calendar/conftest.py b/tests/components/calendar/conftest.py index 83ecaca97d3..3e18f595764 100644 --- a/tests/components/calendar/conftest.py +++ b/tests/components/calendar/conftest.py @@ -1,12 +1,12 @@ """Test fixtures for calendar sensor platforms.""" +from collections.abc import Generator import datetime import secrets from typing import Any from unittest.mock import AsyncMock import pytest -from typing_extensions import Generator from homeassistant.components.calendar import DOMAIN, CalendarEntity, CalendarEvent from homeassistant.config_entries import ConfigEntry, ConfigFlow diff --git a/tests/components/calendar/test_init.py b/tests/components/calendar/test_init.py index 116ca70f15e..cccc960939e 100644 --- a/tests/components/calendar/test_init.py +++ b/tests/components/calendar/test_init.py @@ -2,6 +2,7 @@ from __future__ import annotations +from collections.abc import Generator from datetime import timedelta from http import HTTPStatus from typing import Any @@ -9,7 +10,6 @@ from typing import Any from freezegun import freeze_time import pytest from syrupy.assertion import SnapshotAssertion -from typing_extensions import Generator import voluptuous as vol from homeassistant.components.calendar import DOMAIN, SERVICE_GET_EVENTS diff --git a/tests/components/calendar/test_trigger.py b/tests/components/calendar/test_trigger.py index 3b415d46e63..7e3136237c0 100644 --- a/tests/components/calendar/test_trigger.py +++ b/tests/components/calendar/test_trigger.py @@ -9,7 +9,7 @@ forward exercising the triggers. from __future__ import annotations -from collections.abc import AsyncIterator, Callable +from collections.abc import AsyncIterator, Callable, Generator from contextlib import asynccontextmanager import datetime import logging @@ -19,7 +19,6 @@ import zoneinfo from freezegun.api import FrozenDateTimeFactory import pytest -from typing_extensions import Generator from homeassistant.components import automation, calendar from homeassistant.components.calendar.trigger import EVENT_END, EVENT_START diff --git a/tests/components/camera/conftest.py b/tests/components/camera/conftest.py index 524b56c2303..ea3d65f4864 100644 --- a/tests/components/camera/conftest.py +++ b/tests/components/camera/conftest.py @@ -1,9 +1,9 @@ """Test helpers for camera.""" +from collections.abc import AsyncGenerator, Generator from unittest.mock import PropertyMock, patch import pytest -from typing_extensions import AsyncGenerator, Generator from homeassistant.components import camera from homeassistant.components.camera.const import StreamType diff --git a/tests/components/camera/test_init.py b/tests/components/camera/test_init.py index 7da6cd91a7a..098c321e63b 100644 --- a/tests/components/camera/test_init.py +++ b/tests/components/camera/test_init.py @@ -1,12 +1,12 @@ """The tests for the camera component.""" +from collections.abc import Generator from http import HTTPStatus import io from types import ModuleType from unittest.mock import AsyncMock, Mock, PropertyMock, mock_open, patch import pytest -from typing_extensions import Generator from homeassistant.components import camera from homeassistant.components.camera.const import ( diff --git a/tests/components/canary/conftest.py b/tests/components/canary/conftest.py index 583986fd483..07a3ce89495 100644 --- a/tests/components/canary/conftest.py +++ b/tests/components/canary/conftest.py @@ -1,10 +1,10 @@ """Define fixtures available for all tests.""" +from collections.abc import Generator from unittest.mock import MagicMock, patch from canary.api import Api import pytest -from typing_extensions import Generator from homeassistant.core import HomeAssistant diff --git a/tests/components/ccm15/conftest.py b/tests/components/ccm15/conftest.py index d6cc66d77dc..3bb67e92c51 100644 --- a/tests/components/ccm15/conftest.py +++ b/tests/components/ccm15/conftest.py @@ -1,10 +1,10 @@ """Common fixtures for the Midea ccm15 AC Controller tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch from ccm15 import CCM15DeviceState, CCM15SlaveDevice import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/cert_expiry/conftest.py b/tests/components/cert_expiry/conftest.py index 2a86c669970..4932e9e1869 100644 --- a/tests/components/cert_expiry/conftest.py +++ b/tests/components/cert_expiry/conftest.py @@ -1,9 +1,9 @@ """Configuration for cert_expiry tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/climate/conftest.py b/tests/components/climate/conftest.py index a3a6af6e8a3..fd4368c4219 100644 --- a/tests/components/climate/conftest.py +++ b/tests/components/climate/conftest.py @@ -1,7 +1,8 @@ """Fixtures for Climate platform tests.""" +from collections.abc import Generator + import pytest -from typing_extensions import Generator from homeassistant.config_entries import ConfigFlow from homeassistant.core import HomeAssistant diff --git a/tests/components/climate/test_intent.py b/tests/components/climate/test_intent.py index ab1e3629ef8..54e2e4ff1a6 100644 --- a/tests/components/climate/test_intent.py +++ b/tests/components/climate/test_intent.py @@ -1,7 +1,8 @@ """Test climate intents.""" +from collections.abc import Generator + import pytest -from typing_extensions import Generator from homeassistant.components import conversation from homeassistant.components.climate import ( diff --git a/tests/components/cloud/conftest.py b/tests/components/cloud/conftest.py index c7d0702ea88..3a5d333f9b8 100644 --- a/tests/components/cloud/conftest.py +++ b/tests/components/cloud/conftest.py @@ -1,6 +1,6 @@ """Fixtures for cloud tests.""" -from collections.abc import Callable, Coroutine +from collections.abc import AsyncGenerator, Callable, Coroutine, Generator from pathlib import Path from typing import Any from unittest.mock import DEFAULT, MagicMock, PropertyMock, patch @@ -15,7 +15,6 @@ from hass_nabucasa.remote import RemoteUI from hass_nabucasa.voice import Voice import jwt import pytest -from typing_extensions import AsyncGenerator, Generator from homeassistant.components.cloud.client import CloudClient from homeassistant.components.cloud.const import DATA_CLOUD diff --git a/tests/components/cloud/test_account_link.py b/tests/components/cloud/test_account_link.py index acaff7db76c..cd81a7cf691 100644 --- a/tests/components/cloud/test_account_link.py +++ b/tests/components/cloud/test_account_link.py @@ -1,12 +1,12 @@ """Test account link services.""" import asyncio +from collections.abc import Generator import logging from time import time from unittest.mock import AsyncMock, Mock, patch import pytest -from typing_extensions import Generator from homeassistant import config_entries from homeassistant.components.cloud import account_link diff --git a/tests/components/cloud/test_binary_sensor.py b/tests/components/cloud/test_binary_sensor.py index 789947f3c7d..8a4a1a0e9aa 100644 --- a/tests/components/cloud/test_binary_sensor.py +++ b/tests/components/cloud/test_binary_sensor.py @@ -1,10 +1,10 @@ """Tests for the cloud binary sensor.""" +from collections.abc import Generator from unittest.mock import MagicMock, patch from hass_nabucasa.const import DISPATCH_REMOTE_CONNECT, DISPATCH_REMOTE_DISCONNECT import pytest -from typing_extensions import Generator from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_registry import EntityRegistry diff --git a/tests/components/cloud/test_stt.py b/tests/components/cloud/test_stt.py index df9e62380f8..02acda1450e 100644 --- a/tests/components/cloud/test_stt.py +++ b/tests/components/cloud/test_stt.py @@ -1,5 +1,6 @@ """Test the speech-to-text platform for the cloud integration.""" +from collections.abc import AsyncGenerator from copy import deepcopy from http import HTTPStatus from typing import Any @@ -7,7 +8,6 @@ from unittest.mock import AsyncMock, MagicMock, patch from hass_nabucasa.voice import STTResponse, VoiceError import pytest -from typing_extensions import AsyncGenerator from homeassistant.components.assist_pipeline.pipeline import STORAGE_KEY from homeassistant.components.cloud.const import DOMAIN diff --git a/tests/components/cloud/test_tts.py b/tests/components/cloud/test_tts.py index bf45b6b2895..52a9bc19ea2 100644 --- a/tests/components/cloud/test_tts.py +++ b/tests/components/cloud/test_tts.py @@ -1,6 +1,6 @@ """Tests for cloud tts.""" -from collections.abc import Callable, Coroutine +from collections.abc import AsyncGenerator, Callable, Coroutine from copy import deepcopy from http import HTTPStatus from typing import Any @@ -8,7 +8,6 @@ from unittest.mock import AsyncMock, MagicMock, patch from hass_nabucasa.voice import TTS_VOICES, VoiceError, VoiceTokenError import pytest -from typing_extensions import AsyncGenerator import voluptuous as vol from homeassistant.components.assist_pipeline.pipeline import STORAGE_KEY diff --git a/tests/components/cloudflare/conftest.py b/tests/components/cloudflare/conftest.py index 6c41e9fd179..977126f39a3 100644 --- a/tests/components/cloudflare/conftest.py +++ b/tests/components/cloudflare/conftest.py @@ -1,9 +1,9 @@ """Define fixtures available for all tests.""" +from collections.abc import Generator from unittest.mock import MagicMock, patch import pytest -from typing_extensions import Generator from . import get_mock_client diff --git a/tests/components/co2signal/conftest.py b/tests/components/co2signal/conftest.py index 04ab6db7464..d5cca448569 100644 --- a/tests/components/co2signal/conftest.py +++ b/tests/components/co2signal/conftest.py @@ -1,9 +1,9 @@ """Fixtures for Electricity maps integration tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.co2signal import DOMAIN from homeassistant.const import CONF_API_KEY diff --git a/tests/components/comfoconnect/test_sensor.py b/tests/components/comfoconnect/test_sensor.py index 91e7e1f0e25..fdecfa5b1c7 100644 --- a/tests/components/comfoconnect/test_sensor.py +++ b/tests/components/comfoconnect/test_sensor.py @@ -1,9 +1,9 @@ """Tests for the comfoconnect sensor platform.""" +from collections.abc import Generator from unittest.mock import MagicMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.sensor import DOMAIN from homeassistant.core import HomeAssistant diff --git a/tests/components/config/conftest.py b/tests/components/config/conftest.py index c401ac19fa9..55393a219b1 100644 --- a/tests/components/config/conftest.py +++ b/tests/components/config/conftest.py @@ -1,5 +1,6 @@ """Test fixtures for the config integration.""" +from collections.abc import Generator from contextlib import contextmanager from copy import deepcopy import json @@ -9,7 +10,6 @@ from typing import Any from unittest.mock import patch import pytest -from typing_extensions import Generator from homeassistant.core import HomeAssistant diff --git a/tests/components/config/test_config_entries.py b/tests/components/config/test_config_entries.py index e023a60f215..b184fedf928 100644 --- a/tests/components/config/test_config_entries.py +++ b/tests/components/config/test_config_entries.py @@ -1,12 +1,12 @@ """Test config entries API.""" from collections import OrderedDict +from collections.abc import Generator from http import HTTPStatus from unittest.mock import ANY, AsyncMock, patch from aiohttp.test_utils import TestClient import pytest -from typing_extensions import Generator import voluptuous as vol from homeassistant import config_entries as core_ce, data_entry_flow, loader diff --git a/tests/components/cpuspeed/conftest.py b/tests/components/cpuspeed/conftest.py index e3ea1432659..d9079079ba2 100644 --- a/tests/components/cpuspeed/conftest.py +++ b/tests/components/cpuspeed/conftest.py @@ -2,10 +2,10 @@ from __future__ import annotations +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.cpuspeed.const import DOMAIN from homeassistant.core import HomeAssistant diff --git a/tests/components/crownstone/test_config_flow.py b/tests/components/crownstone/test_config_flow.py index be9086e02da..5dd00e7baff 100644 --- a/tests/components/crownstone/test_config_flow.py +++ b/tests/components/crownstone/test_config_flow.py @@ -2,6 +2,7 @@ from __future__ import annotations +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch from crownstone_cloud.cloud_models.spheres import Spheres @@ -11,7 +12,6 @@ from crownstone_cloud.exceptions import ( ) import pytest from serial.tools.list_ports_common import ListPortInfo -from typing_extensions import Generator from homeassistant.components import usb from homeassistant.components.crownstone.const import ( diff --git a/tests/components/demo/test_camera.py b/tests/components/demo/test_camera.py index 756609ed094..89dd8e0cdf7 100644 --- a/tests/components/demo/test_camera.py +++ b/tests/components/demo/test_camera.py @@ -1,9 +1,9 @@ """The tests for local file camera component.""" +from collections.abc import Generator from unittest.mock import patch import pytest -from typing_extensions import Generator from homeassistant.components.camera import ( DOMAIN as CAMERA_DOMAIN, diff --git a/tests/components/demo/test_climate.py b/tests/components/demo/test_climate.py index 682b85f0845..383e00834b8 100644 --- a/tests/components/demo/test_climate.py +++ b/tests/components/demo/test_climate.py @@ -1,9 +1,9 @@ """The tests for the demo climate component.""" +from collections.abc import Generator from unittest.mock import patch import pytest -from typing_extensions import Generator import voluptuous as vol from homeassistant.components.climate import ( diff --git a/tests/components/demo/test_cover.py b/tests/components/demo/test_cover.py index 7ee408d3bfc..009d2ca2f49 100644 --- a/tests/components/demo/test_cover.py +++ b/tests/components/demo/test_cover.py @@ -1,10 +1,10 @@ """The tests for the Demo cover platform.""" +from collections.abc import Generator from datetime import timedelta from unittest.mock import patch import pytest -from typing_extensions import Generator from homeassistant.components.cover import ( ATTR_CURRENT_POSITION, diff --git a/tests/components/demo/test_init.py b/tests/components/demo/test_init.py index 498a03600cb..0af15455949 100644 --- a/tests/components/demo/test_init.py +++ b/tests/components/demo/test_init.py @@ -1,10 +1,10 @@ """The tests for the Demo component.""" +from collections.abc import Generator import json from unittest.mock import patch import pytest -from typing_extensions import Generator from homeassistant.components.demo import DOMAIN from homeassistant.core import HomeAssistant diff --git a/tests/components/demo/test_light.py b/tests/components/demo/test_light.py index 5c2c478b0bf..e3b1efc7eec 100644 --- a/tests/components/demo/test_light.py +++ b/tests/components/demo/test_light.py @@ -1,9 +1,9 @@ """The tests for the demo light component.""" +from collections.abc import Generator from unittest.mock import patch import pytest -from typing_extensions import Generator from homeassistant.components.demo import DOMAIN from homeassistant.components.light import ( diff --git a/tests/components/demo/test_notify.py b/tests/components/demo/test_notify.py index e9aa97f3d06..98b3de8448a 100644 --- a/tests/components/demo/test_notify.py +++ b/tests/components/demo/test_notify.py @@ -1,9 +1,9 @@ """The tests for the notify demo platform.""" +from collections.abc import Generator from unittest.mock import patch import pytest -from typing_extensions import Generator from homeassistant.components import notify from homeassistant.components.demo import DOMAIN diff --git a/tests/components/demo/test_number.py b/tests/components/demo/test_number.py index 37763b6e289..79885fa8581 100644 --- a/tests/components/demo/test_number.py +++ b/tests/components/demo/test_number.py @@ -1,9 +1,9 @@ """The tests for the demo number component.""" +from collections.abc import Generator from unittest.mock import patch import pytest -from typing_extensions import Generator import voluptuous as vol from homeassistant.components.number import ( diff --git a/tests/components/demo/test_switch.py b/tests/components/demo/test_switch.py index 8b78171fd17..57384526dc0 100644 --- a/tests/components/demo/test_switch.py +++ b/tests/components/demo/test_switch.py @@ -1,9 +1,9 @@ """The tests for the demo switch component.""" +from collections.abc import Generator from unittest.mock import patch import pytest -from typing_extensions import Generator from homeassistant.components.demo import DOMAIN from homeassistant.components.switch import ( diff --git a/tests/components/demo/test_text.py b/tests/components/demo/test_text.py index 3588330c75c..4ca172e5143 100644 --- a/tests/components/demo/test_text.py +++ b/tests/components/demo/test_text.py @@ -1,9 +1,9 @@ """The tests for the demo text component.""" +from collections.abc import Generator from unittest.mock import patch import pytest -from typing_extensions import Generator from homeassistant.components.text import ( ATTR_MAX, diff --git a/tests/components/device_tracker/test_config_entry.py b/tests/components/device_tracker/test_config_entry.py index 45b94012051..5b9ce78e4f5 100644 --- a/tests/components/device_tracker/test_config_entry.py +++ b/tests/components/device_tracker/test_config_entry.py @@ -1,9 +1,9 @@ """Test Device Tracker config entry things.""" +from collections.abc import Generator from typing import Any import pytest -from typing_extensions import Generator from homeassistant.components.device_tracker import ( ATTR_HOST_NAME, diff --git a/tests/components/device_tracker/test_init.py b/tests/components/device_tracker/test_init.py index cedf2a2f0bc..362258b035a 100644 --- a/tests/components/device_tracker/test_init.py +++ b/tests/components/device_tracker/test_init.py @@ -1,5 +1,6 @@ """The tests for the device tracker component.""" +from collections.abc import Generator from datetime import datetime, timedelta import json import logging @@ -8,7 +9,6 @@ from types import ModuleType from unittest.mock import call, patch import pytest -from typing_extensions import Generator from homeassistant.components import device_tracker, zone from homeassistant.components.device_tracker import SourceType, const, legacy diff --git a/tests/components/devolo_home_control/conftest.py b/tests/components/devolo_home_control/conftest.py index 04752da5925..55e072d075c 100644 --- a/tests/components/devolo_home_control/conftest.py +++ b/tests/components/devolo_home_control/conftest.py @@ -1,9 +1,9 @@ """Fixtures for tests.""" +from collections.abc import Generator from unittest.mock import MagicMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/discovergy/conftest.py b/tests/components/discovergy/conftest.py index 056f763c3e2..4f65099c1b4 100644 --- a/tests/components/discovergy/conftest.py +++ b/tests/components/discovergy/conftest.py @@ -1,10 +1,10 @@ """Fixtures for Discovergy integration tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch from pydiscovergy.models import Reading import pytest -from typing_extensions import Generator from homeassistant.components.discovergy.const import DOMAIN from homeassistant.const import CONF_EMAIL, CONF_PASSWORD diff --git a/tests/components/dlink/conftest.py b/tests/components/dlink/conftest.py index 4bbf99000a9..c56b93c4d3d 100644 --- a/tests/components/dlink/conftest.py +++ b/tests/components/dlink/conftest.py @@ -1,11 +1,10 @@ """Configure pytest for D-Link tests.""" -from collections.abc import Awaitable, Callable +from collections.abc import Awaitable, Callable, Generator from copy import deepcopy from unittest.mock import MagicMock, patch import pytest -from typing_extensions import Generator from homeassistant.components import dhcp from homeassistant.components.dlink.const import CONF_USE_LEGACY_PROTOCOL, DOMAIN diff --git a/tests/components/dsmr/conftest.py b/tests/components/dsmr/conftest.py index 2257b8414a6..2301b9dfc80 100644 --- a/tests/components/dsmr/conftest.py +++ b/tests/components/dsmr/conftest.py @@ -1,6 +1,7 @@ """Common test tools.""" import asyncio +from collections.abc import Generator from unittest.mock import MagicMock, patch from dsmr_parser.clients.protocol import DSMRProtocol @@ -15,7 +16,6 @@ from dsmr_parser.obis_references import ( ) from dsmr_parser.objects import CosemObject import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/duotecno/conftest.py b/tests/components/duotecno/conftest.py index 1b6ba8f65e5..1bdd26bab9c 100644 --- a/tests/components/duotecno/conftest.py +++ b/tests/components/duotecno/conftest.py @@ -1,9 +1,9 @@ """Common fixtures for the duotecno tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/dwd_weather_warnings/conftest.py b/tests/components/dwd_weather_warnings/conftest.py index 40c8bf3cfa0..50c0fe51024 100644 --- a/tests/components/dwd_weather_warnings/conftest.py +++ b/tests/components/dwd_weather_warnings/conftest.py @@ -1,9 +1,9 @@ """Configuration for Deutscher Wetterdienst (DWD) Weather Warnings tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, Mock, patch import pytest -from typing_extensions import Generator from homeassistant.components.dwd_weather_warnings.const import ( ADVANCE_WARNING_SENSOR, diff --git a/tests/components/easyenergy/conftest.py b/tests/components/easyenergy/conftest.py index 96d356b8906..ffe0e36f3d2 100644 --- a/tests/components/easyenergy/conftest.py +++ b/tests/components/easyenergy/conftest.py @@ -1,11 +1,11 @@ """Fixtures for easyEnergy integration tests.""" +from collections.abc import Generator import json from unittest.mock import AsyncMock, MagicMock, patch from easyenergy import Electricity, Gas import pytest -from typing_extensions import Generator from homeassistant.components.easyenergy.const import DOMAIN from homeassistant.core import HomeAssistant diff --git a/tests/components/ecobee/conftest.py b/tests/components/ecobee/conftest.py index d9583e15986..01f249bea15 100644 --- a/tests/components/ecobee/conftest.py +++ b/tests/components/ecobee/conftest.py @@ -1,10 +1,10 @@ """Fixtures for tests.""" +from collections.abc import Generator from unittest.mock import MagicMock, patch import pytest from requests_mock import Mocker -from typing_extensions import Generator from homeassistant.components.ecobee import ECOBEE_API_KEY, ECOBEE_REFRESH_TOKEN diff --git a/tests/components/ecoforest/conftest.py b/tests/components/ecoforest/conftest.py index 3eb13e58aee..85bfff08bdf 100644 --- a/tests/components/ecoforest/conftest.py +++ b/tests/components/ecoforest/conftest.py @@ -1,10 +1,10 @@ """Common fixtures for the Ecoforest tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, Mock, patch from pyecoforest.models.device import Alarm, Device, OperationMode, State import pytest -from typing_extensions import Generator from homeassistant.components.ecoforest import DOMAIN from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME diff --git a/tests/components/ecovacs/conftest.py b/tests/components/ecovacs/conftest.py index 8d0033a6bc9..59721b65563 100644 --- a/tests/components/ecovacs/conftest.py +++ b/tests/components/ecovacs/conftest.py @@ -1,5 +1,6 @@ """Common fixtures for the Ecovacs tests.""" +from collections.abc import AsyncGenerator, Generator from typing import Any from unittest.mock import AsyncMock, Mock, patch @@ -9,7 +10,6 @@ from deebot_client.device import Device from deebot_client.exceptions import ApiError from deebot_client.models import Credentials import pytest -from typing_extensions import AsyncGenerator, Generator from homeassistant.components.ecovacs import PLATFORMS from homeassistant.components.ecovacs.const import DOMAIN diff --git a/tests/components/edl21/conftest.py b/tests/components/edl21/conftest.py index b6af4ea9cef..1b14e3366d8 100644 --- a/tests/components/edl21/conftest.py +++ b/tests/components/edl21/conftest.py @@ -1,9 +1,9 @@ """Define test fixtures for EDL21.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/electric_kiwi/conftest.py b/tests/components/electric_kiwi/conftest.py index c9f9c7e04f0..010efcb7b5f 100644 --- a/tests/components/electric_kiwi/conftest.py +++ b/tests/components/electric_kiwi/conftest.py @@ -2,13 +2,12 @@ from __future__ import annotations -from collections.abc import Awaitable, Callable +from collections.abc import Awaitable, Callable, Generator from time import time from unittest.mock import AsyncMock, patch from electrickiwi_api.model import AccountBalance, Hop, HopIntervals import pytest -from typing_extensions import Generator from homeassistant.components.application_credentials import ( ClientCredential, diff --git a/tests/components/elgato/conftest.py b/tests/components/elgato/conftest.py index aaaed0dc8da..73b09421576 100644 --- a/tests/components/elgato/conftest.py +++ b/tests/components/elgato/conftest.py @@ -1,10 +1,10 @@ """Fixtures for Elgato integration tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch from elgato import BatteryInfo, ElgatoNoBatteryError, Info, Settings, State import pytest -from typing_extensions import Generator from homeassistant.components.elgato.const import DOMAIN from homeassistant.const import CONF_HOST, CONF_MAC, CONF_PORT diff --git a/tests/components/elmax/conftest.py b/tests/components/elmax/conftest.py index 552aa138f1b..f92fc2f1827 100644 --- a/tests/components/elmax/conftest.py +++ b/tests/components/elmax/conftest.py @@ -1,5 +1,6 @@ """Configuration for Elmax tests.""" +from collections.abc import Generator import json from unittest.mock import AsyncMock, patch @@ -12,7 +13,6 @@ from elmax_api.constants import ( from httpx import Response import pytest import respx -from typing_extensions import Generator from . import ( MOCK_DIRECT_HOST, diff --git a/tests/components/elvia/conftest.py b/tests/components/elvia/conftest.py index 0708e5c698a..13955db49d5 100644 --- a/tests/components/elvia/conftest.py +++ b/tests/components/elvia/conftest.py @@ -1,9 +1,9 @@ """Common fixtures for the Elvia tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/emulated_hue/test_hue_api.py b/tests/components/emulated_hue/test_hue_api.py index 40f9f7bce14..28e269fdaeb 100644 --- a/tests/components/emulated_hue/test_hue_api.py +++ b/tests/components/emulated_hue/test_hue_api.py @@ -3,6 +3,7 @@ from __future__ import annotations import asyncio +from collections.abc import Generator from datetime import timedelta from http import HTTPStatus from ipaddress import ip_address @@ -12,7 +13,6 @@ from unittest.mock import AsyncMock, _patch, patch from aiohttp.hdrs import CONTENT_TYPE from aiohttp.test_utils import TestClient import pytest -from typing_extensions import Generator from homeassistant import const, setup from homeassistant.components import ( diff --git a/tests/components/emulated_hue/test_upnp.py b/tests/components/emulated_hue/test_upnp.py index 3522f7e8047..b16fda536c6 100644 --- a/tests/components/emulated_hue/test_upnp.py +++ b/tests/components/emulated_hue/test_upnp.py @@ -1,6 +1,7 @@ """The tests for the emulated Hue component.""" from asyncio import AbstractEventLoop +from collections.abc import Generator from http import HTTPStatus import json import unittest @@ -10,7 +11,6 @@ from aiohttp import web from aiohttp.test_utils import TestClient import defusedxml.ElementTree as ET import pytest -from typing_extensions import Generator from homeassistant import setup from homeassistant.components import emulated_hue diff --git a/tests/components/energenie_power_sockets/conftest.py b/tests/components/energenie_power_sockets/conftest.py index 64eb8bbd2a8..c142e436fd3 100644 --- a/tests/components/energenie_power_sockets/conftest.py +++ b/tests/components/energenie_power_sockets/conftest.py @@ -1,11 +1,11 @@ """Configure tests for Energenie-Power-Sockets.""" +from collections.abc import Generator from typing import Final from unittest.mock import MagicMock, patch from pyegps.fakes.powerstrip import FakePowerStrip import pytest -from typing_extensions import Generator from homeassistant.components.energenie_power_sockets.const import ( CONF_DEVICE_API_ID, diff --git a/tests/components/energyzero/conftest.py b/tests/components/energyzero/conftest.py index 49f6c18b09e..d42283c0d4b 100644 --- a/tests/components/energyzero/conftest.py +++ b/tests/components/energyzero/conftest.py @@ -1,11 +1,11 @@ """Fixtures for EnergyZero integration tests.""" +from collections.abc import Generator import json from unittest.mock import AsyncMock, MagicMock, patch from energyzero import Electricity, Gas import pytest -from typing_extensions import Generator from homeassistant.components.energyzero.const import DOMAIN from homeassistant.core import HomeAssistant diff --git a/tests/components/enphase_envoy/conftest.py b/tests/components/enphase_envoy/conftest.py index 647084c21ff..deebada3d45 100644 --- a/tests/components/enphase_envoy/conftest.py +++ b/tests/components/enphase_envoy/conftest.py @@ -1,5 +1,6 @@ """Define test fixtures for Enphase Envoy.""" +from collections.abc import AsyncGenerator from unittest.mock import AsyncMock, Mock, patch import jwt @@ -21,7 +22,6 @@ from pyenphase.models.meters import ( EnvoyPhaseMode, ) import pytest -from typing_extensions import AsyncGenerator from homeassistant.components.enphase_envoy import DOMAIN from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PASSWORD, CONF_USERNAME diff --git a/tests/components/enphase_envoy/test_sensor.py b/tests/components/enphase_envoy/test_sensor.py index bfb6fdb2826..f101031da5f 100644 --- a/tests/components/enphase_envoy/test_sensor.py +++ b/tests/components/enphase_envoy/test_sensor.py @@ -1,10 +1,10 @@ """Test Enphase Envoy sensors.""" +from collections.abc import AsyncGenerator from unittest.mock import Mock, patch import pytest from syrupy.assertion import SnapshotAssertion -from typing_extensions import AsyncGenerator from homeassistant.components.enphase_envoy import DOMAIN from homeassistant.components.enphase_envoy.const import Platform diff --git a/tests/components/esphome/conftest.py b/tests/components/esphome/conftest.py index 8a069d257d8..75be231558f 100644 --- a/tests/components/esphome/conftest.py +++ b/tests/components/esphome/conftest.py @@ -4,7 +4,7 @@ from __future__ import annotations import asyncio from asyncio import Event -from collections.abc import Awaitable, Callable, Coroutine +from collections.abc import AsyncGenerator, Awaitable, Callable, Coroutine from pathlib import Path from typing import Any from unittest.mock import AsyncMock, MagicMock, Mock, patch @@ -24,7 +24,6 @@ from aioesphomeapi import ( VoiceAssistantFeature, ) import pytest -from typing_extensions import AsyncGenerator from zeroconf import Zeroconf from homeassistant.components.esphome import dashboard diff --git a/tests/components/event/test_init.py b/tests/components/event/test_init.py index 981a7744beb..c6828c2c290 100644 --- a/tests/components/event/test_init.py +++ b/tests/components/event/test_init.py @@ -1,10 +1,10 @@ """The tests for the event integration.""" +from collections.abc import Generator from typing import Any from freezegun import freeze_time import pytest -from typing_extensions import Generator from homeassistant.components.event import ( ATTR_EVENT_TYPE, diff --git a/tests/components/evil_genius_labs/conftest.py b/tests/components/evil_genius_labs/conftest.py index 081b7a5120a..fc0725607e2 100644 --- a/tests/components/evil_genius_labs/conftest.py +++ b/tests/components/evil_genius_labs/conftest.py @@ -1,10 +1,10 @@ """Test helpers for Evil Genius Labs.""" +from collections.abc import AsyncGenerator from typing import Any from unittest.mock import patch import pytest -from typing_extensions import AsyncGenerator from homeassistant.const import Platform from homeassistant.core import HomeAssistant diff --git a/tests/components/fibaro/conftest.py b/tests/components/fibaro/conftest.py index d2f004a160c..4d99dea6682 100644 --- a/tests/components/fibaro/conftest.py +++ b/tests/components/fibaro/conftest.py @@ -1,9 +1,9 @@ """Test helpers.""" +from collections.abc import Generator from unittest.mock import AsyncMock, Mock, patch import pytest -from typing_extensions import Generator from homeassistant.components.fibaro import CONF_IMPORT_PLUGINS, DOMAIN from homeassistant.const import CONF_PASSWORD, CONF_URL, CONF_USERNAME diff --git a/tests/components/file/conftest.py b/tests/components/file/conftest.py index 265acde36ca..5345a0d38d0 100644 --- a/tests/components/file/conftest.py +++ b/tests/components/file/conftest.py @@ -1,9 +1,9 @@ """Test fixtures for file platform.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch import pytest -from typing_extensions import Generator from homeassistant.core import HomeAssistant diff --git a/tests/components/filesize/conftest.py b/tests/components/filesize/conftest.py index 859886a3058..ac66af0d22f 100644 --- a/tests/components/filesize/conftest.py +++ b/tests/components/filesize/conftest.py @@ -2,11 +2,11 @@ from __future__ import annotations +from collections.abc import Generator from pathlib import Path from unittest.mock import patch import pytest -from typing_extensions import Generator from homeassistant.components.filesize.const import DOMAIN from homeassistant.const import CONF_FILE_PATH diff --git a/tests/components/fitbit/conftest.py b/tests/components/fitbit/conftest.py index b1ff8a94e12..57511739993 100644 --- a/tests/components/fitbit/conftest.py +++ b/tests/components/fitbit/conftest.py @@ -1,6 +1,6 @@ """Test fixtures for fitbit.""" -from collections.abc import Awaitable, Callable +from collections.abc import Awaitable, Callable, Generator import datetime from http import HTTPStatus import time @@ -9,7 +9,6 @@ from unittest.mock import patch import pytest from requests_mock.mocker import Mocker -from typing_extensions import Generator from homeassistant.components.application_credentials import ( ClientCredential, diff --git a/tests/components/fjaraskupan/test_config_flow.py b/tests/components/fjaraskupan/test_config_flow.py index 886e01c8966..6d3df614443 100644 --- a/tests/components/fjaraskupan/test_config_flow.py +++ b/tests/components/fjaraskupan/test_config_flow.py @@ -2,10 +2,10 @@ from __future__ import annotations +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant import config_entries from homeassistant.components.fjaraskupan.const import DOMAIN diff --git a/tests/components/flexit_bacnet/conftest.py b/tests/components/flexit_bacnet/conftest.py index e1b98070d25..cc7c9fa0570 100644 --- a/tests/components/flexit_bacnet/conftest.py +++ b/tests/components/flexit_bacnet/conftest.py @@ -1,10 +1,10 @@ """Configuration for Flexit Nordic (BACnet) tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch from flexit_bacnet import FlexitBACnet import pytest -from typing_extensions import Generator from homeassistant import config_entries from homeassistant.components.flexit_bacnet.const import DOMAIN diff --git a/tests/components/flux_led/conftest.py b/tests/components/flux_led/conftest.py index bc9f68dc3b1..d323b321e08 100644 --- a/tests/components/flux_led/conftest.py +++ b/tests/components/flux_led/conftest.py @@ -1,9 +1,9 @@ """Tests for the flux_led integration.""" +from collections.abc import Generator from unittest.mock import patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/folder_watcher/conftest.py b/tests/components/folder_watcher/conftest.py index 6de9c69d574..ed0adea7a7d 100644 --- a/tests/components/folder_watcher/conftest.py +++ b/tests/components/folder_watcher/conftest.py @@ -2,12 +2,12 @@ from __future__ import annotations +from collections.abc import Generator from pathlib import Path from unittest.mock import patch from freezegun.api import FrozenDateTimeFactory import pytest -from typing_extensions import Generator from homeassistant.components.folder_watcher.const import DOMAIN from homeassistant.config_entries import SOURCE_USER diff --git a/tests/components/forecast_solar/conftest.py b/tests/components/forecast_solar/conftest.py index d1eacad8dbe..01c1f6d8d32 100644 --- a/tests/components/forecast_solar/conftest.py +++ b/tests/components/forecast_solar/conftest.py @@ -1,11 +1,11 @@ """Fixtures for Forecast.Solar integration tests.""" +from collections.abc import Generator from datetime import datetime, timedelta from unittest.mock import AsyncMock, MagicMock, patch from forecast_solar import models import pytest -from typing_extensions import Generator from homeassistant.components.forecast_solar.const import ( CONF_AZIMUTH, diff --git a/tests/components/freedompro/conftest.py b/tests/components/freedompro/conftest.py index 91eecc24f27..8e581673b92 100644 --- a/tests/components/freedompro/conftest.py +++ b/tests/components/freedompro/conftest.py @@ -2,12 +2,12 @@ from __future__ import annotations +from collections.abc import Generator from copy import deepcopy from typing import Any from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.freedompro.const import DOMAIN from homeassistant.core import HomeAssistant diff --git a/tests/components/frontend/test_init.py b/tests/components/frontend/test_init.py index 501f9c482f2..0856d81e205 100644 --- a/tests/components/frontend/test_init.py +++ b/tests/components/frontend/test_init.py @@ -1,6 +1,7 @@ """The tests for Home Assistant frontend.""" from asyncio import AbstractEventLoop +from collections.abc import Generator from http import HTTPStatus from pathlib import Path import re @@ -10,7 +11,6 @@ from unittest.mock import patch from aiohttp.test_utils import TestClient from freezegun.api import FrozenDateTimeFactory import pytest -from typing_extensions import Generator from homeassistant.components.frontend import ( CONF_EXTRA_JS_URL_ES5, diff --git a/tests/components/frontier_silicon/conftest.py b/tests/components/frontier_silicon/conftest.py index 2322740c69a..709b1842472 100644 --- a/tests/components/frontier_silicon/conftest.py +++ b/tests/components/frontier_silicon/conftest.py @@ -1,9 +1,9 @@ """Configuration for frontier_silicon tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.frontier_silicon.const import CONF_WEBFSAPI_URL, DOMAIN from homeassistant.const import CONF_PIN diff --git a/tests/components/fully_kiosk/conftest.py b/tests/components/fully_kiosk/conftest.py index 3f7c2985daf..028eefcf361 100644 --- a/tests/components/fully_kiosk/conftest.py +++ b/tests/components/fully_kiosk/conftest.py @@ -2,11 +2,11 @@ from __future__ import annotations +from collections.abc import Generator import json from unittest.mock import AsyncMock, MagicMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.fully_kiosk.const import DOMAIN from homeassistant.const import ( diff --git a/tests/components/fyta/conftest.py b/tests/components/fyta/conftest.py index de5dece776c..6a67ae75ec2 100644 --- a/tests/components/fyta/conftest.py +++ b/tests/components/fyta/conftest.py @@ -1,10 +1,10 @@ """Test helpers for FYTA.""" +from collections.abc import Generator from datetime import UTC, datetime from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.fyta.const import CONF_EXPIRATION, DOMAIN as FYTA_DOMAIN from homeassistant.const import CONF_ACCESS_TOKEN, CONF_PASSWORD, CONF_USERNAME