diff --git a/tests/components/qbittorrent/conftest.py b/tests/components/qbittorrent/conftest.py index b15e2a6865b..17fb8e15b47 100644 --- a/tests/components/qbittorrent/conftest.py +++ b/tests/components/qbittorrent/conftest.py @@ -1,10 +1,10 @@ """Fixtures for testing qBittorrent component.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest import requests_mock -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/qnap/conftest.py b/tests/components/qnap/conftest.py index c0947318f60..2625f1805b6 100644 --- a/tests/components/qnap/conftest.py +++ b/tests/components/qnap/conftest.py @@ -1,9 +1,9 @@ """Setup the QNAP tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch import pytest -from typing_extensions import Generator TEST_HOST = "1.2.3.4" TEST_USERNAME = "admin" diff --git a/tests/components/rabbitair/test_config_flow.py b/tests/components/rabbitair/test_config_flow.py index 2e0cfba38c0..7f9479339a5 100644 --- a/tests/components/rabbitair/test_config_flow.py +++ b/tests/components/rabbitair/test_config_flow.py @@ -2,12 +2,12 @@ from __future__ import annotations +from collections.abc import Generator from ipaddress import ip_address from unittest.mock import MagicMock, Mock, patch import pytest from rabbitair import Mode, Model, Speed -from typing_extensions import Generator from homeassistant import config_entries from homeassistant.components import zeroconf diff --git a/tests/components/radio_browser/conftest.py b/tests/components/radio_browser/conftest.py index 95fda545a6c..fc666b32c53 100644 --- a/tests/components/radio_browser/conftest.py +++ b/tests/components/radio_browser/conftest.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.components.radio_browser.const import DOMAIN diff --git a/tests/components/rainbird/conftest.py b/tests/components/rainbird/conftest.py index a2c26c71231..b0411d9d313 100644 --- a/tests/components/rainbird/conftest.py +++ b/tests/components/rainbird/conftest.py @@ -2,6 +2,7 @@ from __future__ import annotations +from collections.abc import Generator from http import HTTPStatus import json from typing import Any @@ -9,7 +10,6 @@ from unittest.mock import patch from pyrainbird import encryption import pytest -from typing_extensions import Generator from homeassistant.components.rainbird import DOMAIN from homeassistant.components.rainbird.const import ( diff --git a/tests/components/rainbird/test_config_flow.py b/tests/components/rainbird/test_config_flow.py index cdcef95f458..174bbdb3d48 100644 --- a/tests/components/rainbird/test_config_flow.py +++ b/tests/components/rainbird/test_config_flow.py @@ -1,11 +1,11 @@ """Tests for the Rain Bird config flow.""" +from collections.abc import AsyncGenerator from http import HTTPStatus from typing import Any from unittest.mock import AsyncMock, Mock, patch import pytest -from typing_extensions import AsyncGenerator from homeassistant import config_entries from homeassistant.components.rainbird import DOMAIN diff --git a/tests/components/rainforest_raven/conftest.py b/tests/components/rainforest_raven/conftest.py index 0a809c6430a..35ce4443032 100644 --- a/tests/components/rainforest_raven/conftest.py +++ b/tests/components/rainforest_raven/conftest.py @@ -1,9 +1,9 @@ """Fixtures for the Rainforest RAVEn tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant.core import HomeAssistant diff --git a/tests/components/rainforest_raven/test_config_flow.py b/tests/components/rainforest_raven/test_config_flow.py index 7f7041cbcd8..da7e65882a4 100644 --- a/tests/components/rainforest_raven/test_config_flow.py +++ b/tests/components/rainforest_raven/test_config_flow.py @@ -1,11 +1,11 @@ """Test Rainforest RAVEn config flow.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch from aioraven.device import RAVEnConnectionError import pytest from serial.tools.list_ports_common import ListPortInfo -from typing_extensions import Generator from homeassistant.components.rainforest_raven.const import DOMAIN from homeassistant.config_entries import SOURCE_USB, SOURCE_USER diff --git a/tests/components/rdw/conftest.py b/tests/components/rdw/conftest.py index 3f45f44e3d8..71c73a55441 100644 --- a/tests/components/rdw/conftest.py +++ b/tests/components/rdw/conftest.py @@ -2,10 +2,10 @@ from __future__ import annotations +from collections.abc import Generator from unittest.mock import MagicMock, patch import pytest -from typing_extensions import Generator from vehicle import Vehicle from homeassistant.components.rdw.const import CONF_LICENSE_PLATE, DOMAIN diff --git a/tests/components/recorder/conftest.py b/tests/components/recorder/conftest.py index 4db573fa65f..a1ff8dc2413 100644 --- a/tests/components/recorder/conftest.py +++ b/tests/components/recorder/conftest.py @@ -1,9 +1,9 @@ """Fixtures for the recorder component tests.""" +from collections.abc import Generator from unittest.mock import patch import pytest -from typing_extensions import Generator from homeassistant.components import recorder from homeassistant.core import HomeAssistant diff --git a/tests/components/recorder/test_filters_with_entityfilter_schema_37.py b/tests/components/recorder/test_filters_with_entityfilter_schema_37.py index 9c66d2ee169..6269d2bf903 100644 --- a/tests/components/recorder/test_filters_with_entityfilter_schema_37.py +++ b/tests/components/recorder/test_filters_with_entityfilter_schema_37.py @@ -1,12 +1,12 @@ """The tests for the recorder filter matching the EntityFilter component.""" +from collections.abc import AsyncGenerator import json from unittest.mock import patch import pytest from sqlalchemy import select from sqlalchemy.engine.row import Row -from typing_extensions import AsyncGenerator from homeassistant.components.recorder import Recorder, get_instance from homeassistant.components.recorder.db_schema import EventData, Events, States diff --git a/tests/components/recorder/test_init.py b/tests/components/recorder/test_init.py index 071324e4b6a..52a220662ae 100644 --- a/tests/components/recorder/test_init.py +++ b/tests/components/recorder/test_init.py @@ -3,6 +3,7 @@ from __future__ import annotations import asyncio +from collections.abc import Generator from datetime import datetime, timedelta from pathlib import Path import sqlite3 @@ -14,7 +15,6 @@ from freezegun.api import FrozenDateTimeFactory import pytest from sqlalchemy.exc import DatabaseError, OperationalError, SQLAlchemyError from sqlalchemy.pool import QueuePool -from typing_extensions import Generator from homeassistant.components import recorder from homeassistant.components.recorder import ( diff --git a/tests/components/recorder/test_migration_from_schema_32.py b/tests/components/recorder/test_migration_from_schema_32.py index 8fda495cf60..ec307632826 100644 --- a/tests/components/recorder/test_migration_from_schema_32.py +++ b/tests/components/recorder/test_migration_from_schema_32.py @@ -1,5 +1,6 @@ """The tests for the recorder filter matching the EntityFilter component.""" +from collections.abc import AsyncGenerator import datetime import importlib import sys @@ -12,7 +13,6 @@ import pytest from sqlalchemy import create_engine, inspect from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import Session -from typing_extensions import AsyncGenerator from homeassistant.components import recorder from homeassistant.components.recorder import ( diff --git a/tests/components/recorder/test_purge.py b/tests/components/recorder/test_purge.py index 1ccbaada265..df5a6a77cfc 100644 --- a/tests/components/recorder/test_purge.py +++ b/tests/components/recorder/test_purge.py @@ -1,5 +1,6 @@ """Test data purging.""" +from collections.abc import Generator from datetime import datetime, timedelta import json import sqlite3 @@ -9,7 +10,6 @@ from freezegun import freeze_time import pytest from sqlalchemy.exc import DatabaseError, OperationalError from sqlalchemy.orm.session import Session -from typing_extensions import Generator from voluptuous.error import MultipleInvalid from homeassistant.components import recorder diff --git a/tests/components/recorder/test_purge_v32_schema.py b/tests/components/recorder/test_purge_v32_schema.py index fb636cfa9dc..94ea2d51db3 100644 --- a/tests/components/recorder/test_purge_v32_schema.py +++ b/tests/components/recorder/test_purge_v32_schema.py @@ -1,5 +1,6 @@ """Test data purging.""" +from collections.abc import Generator from datetime import datetime, timedelta import json import sqlite3 @@ -10,7 +11,6 @@ import pytest from sqlalchemy import text, update from sqlalchemy.exc import DatabaseError, OperationalError from sqlalchemy.orm.session import Session -from typing_extensions import Generator from homeassistant.components import recorder from homeassistant.components.recorder import migration diff --git a/tests/components/refoss/conftest.py b/tests/components/refoss/conftest.py index 80b3f4d8b75..5ded3e9489d 100644 --- a/tests/components/refoss/conftest.py +++ b/tests/components/refoss/conftest.py @@ -1,9 +1,9 @@ """Pytest module configuration.""" +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/renault/conftest.py b/tests/components/renault/conftest.py index a5af01b504a..00e35e1fa76 100644 --- a/tests/components/renault/conftest.py +++ b/tests/components/renault/conftest.py @@ -1,5 +1,6 @@ """Provide common Renault fixtures.""" +from collections.abc import Generator import contextlib from types import MappingProxyType from typing import Any @@ -8,7 +9,6 @@ from unittest.mock import AsyncMock, patch import pytest from renault_api.kamereon import exceptions, schemas from renault_api.renault_account import RenaultAccount -from typing_extensions import Generator from homeassistant.components.renault.const import DOMAIN from homeassistant.config_entries import SOURCE_USER, ConfigEntry diff --git a/tests/components/renault/test_binary_sensor.py b/tests/components/renault/test_binary_sensor.py index a0264493544..52b6de33f14 100644 --- a/tests/components/renault/test_binary_sensor.py +++ b/tests/components/renault/test_binary_sensor.py @@ -1,10 +1,10 @@ """Tests for Renault binary sensors.""" +from collections.abc import Generator from unittest.mock import patch import pytest from syrupy.assertion import SnapshotAssertion -from typing_extensions import Generator from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform diff --git a/tests/components/renault/test_button.py b/tests/components/renault/test_button.py index bed188d8881..32c5ce651ae 100644 --- a/tests/components/renault/test_button.py +++ b/tests/components/renault/test_button.py @@ -1,11 +1,11 @@ """Tests for Renault sensors.""" +from collections.abc import Generator from unittest.mock import patch import pytest from renault_api.kamereon import schemas from syrupy.assertion import SnapshotAssertion -from typing_extensions import Generator from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS from homeassistant.config_entries import ConfigEntry diff --git a/tests/components/renault/test_device_tracker.py b/tests/components/renault/test_device_tracker.py index d8bee097eda..39f37d12a4d 100644 --- a/tests/components/renault/test_device_tracker.py +++ b/tests/components/renault/test_device_tracker.py @@ -1,10 +1,10 @@ """Tests for Renault sensors.""" +from collections.abc import Generator from unittest.mock import patch import pytest from syrupy.assertion import SnapshotAssertion -from typing_extensions import Generator from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform diff --git a/tests/components/renault/test_init.py b/tests/components/renault/test_init.py index 90963fd3521..0f9d9cbaf5b 100644 --- a/tests/components/renault/test_init.py +++ b/tests/components/renault/test_init.py @@ -1,12 +1,12 @@ """Tests for Renault setup process.""" +from collections.abc import Generator from typing import Any from unittest.mock import Mock, patch import aiohttp import pytest from renault_api.gigya.exceptions import GigyaException, InvalidCredentialsException -from typing_extensions import Generator from homeassistant.components.renault.const import DOMAIN from homeassistant.config_entries import ConfigEntry, ConfigEntryState diff --git a/tests/components/renault/test_select.py b/tests/components/renault/test_select.py index 0577966d514..7b589d86863 100644 --- a/tests/components/renault/test_select.py +++ b/tests/components/renault/test_select.py @@ -1,11 +1,11 @@ """Tests for Renault selects.""" +from collections.abc import Generator from unittest.mock import patch import pytest from renault_api.kamereon import schemas from syrupy.assertion import SnapshotAssertion -from typing_extensions import Generator from homeassistant.components.select import ( ATTR_OPTION, diff --git a/tests/components/renault/test_sensor.py b/tests/components/renault/test_sensor.py index 7e8e4f24c77..d69ab5c0b7f 100644 --- a/tests/components/renault/test_sensor.py +++ b/tests/components/renault/test_sensor.py @@ -1,10 +1,10 @@ """Tests for Renault sensors.""" +from collections.abc import Generator from unittest.mock import patch import pytest from syrupy.assertion import SnapshotAssertion -from typing_extensions import Generator from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform diff --git a/tests/components/renault/test_services.py b/tests/components/renault/test_services.py index d30626e4117..4e3460b9afa 100644 --- a/tests/components/renault/test_services.py +++ b/tests/components/renault/test_services.py @@ -1,5 +1,6 @@ """Tests for Renault sensors.""" +from collections.abc import Generator from datetime import datetime from unittest.mock import patch @@ -7,7 +8,6 @@ import pytest from renault_api.exceptions import RenaultException from renault_api.kamereon import schemas from renault_api.kamereon.models import ChargeSchedule -from typing_extensions import Generator from homeassistant.components.renault.const import DOMAIN from homeassistant.components.renault.services import ( diff --git a/tests/components/reolink/conftest.py b/tests/components/reolink/conftest.py index 105815bae1d..ac606017837 100644 --- a/tests/components/reolink/conftest.py +++ b/tests/components/reolink/conftest.py @@ -1,9 +1,9 @@ """Setup the Reolink tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.reolink import const from homeassistant.components.reolink.config_flow import DEFAULT_PROTOCOL diff --git a/tests/components/ring/conftest.py b/tests/components/ring/conftest.py index 58e77184f55..cd4447c1a9a 100644 --- a/tests/components/ring/conftest.py +++ b/tests/components/ring/conftest.py @@ -1,11 +1,11 @@ """Configuration for Ring tests.""" +from collections.abc import Generator from itertools import chain from unittest.mock import AsyncMock, Mock, create_autospec, patch import pytest import ring_doorbell -from typing_extensions import Generator from homeassistant.components.ring import DOMAIN from homeassistant.const import CONF_USERNAME diff --git a/tests/components/roku/conftest.py b/tests/components/roku/conftest.py index 160a1bf3127..7ac332a1a6c 100644 --- a/tests/components/roku/conftest.py +++ b/tests/components/roku/conftest.py @@ -1,11 +1,11 @@ """Fixtures for Roku integration tests.""" +from collections.abc import Generator import json from unittest.mock import MagicMock, patch import pytest from rokuecp import Device as RokuDevice -from typing_extensions import Generator from homeassistant.components.roku.const import DOMAIN from homeassistant.const import CONF_HOST diff --git a/tests/components/rtsp_to_webrtc/conftest.py b/tests/components/rtsp_to_webrtc/conftest.py index 6e790b4ff00..956825f6372 100644 --- a/tests/components/rtsp_to_webrtc/conftest.py +++ b/tests/components/rtsp_to_webrtc/conftest.py @@ -2,13 +2,12 @@ from __future__ import annotations -from collections.abc import Awaitable, Callable +from collections.abc import AsyncGenerator, Awaitable, Callable from typing import Any from unittest.mock import patch import pytest import rtsp_to_webrtc -from typing_extensions import AsyncGenerator from homeassistant.components import camera from homeassistant.components.rtsp_to_webrtc import DOMAIN diff --git a/tests/components/sabnzbd/conftest.py b/tests/components/sabnzbd/conftest.py index 7d68d3108f0..b5450e5134f 100644 --- a/tests/components/sabnzbd/conftest.py +++ b/tests/components/sabnzbd/conftest.py @@ -1,9 +1,9 @@ """Configuration for Sabnzbd 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/samsungtv/conftest.py b/tests/components/samsungtv/conftest.py index 8d38adad06d..15794440343 100644 --- a/tests/components/samsungtv/conftest.py +++ b/tests/components/samsungtv/conftest.py @@ -2,7 +2,7 @@ from __future__ import annotations -from collections.abc import Awaitable, Callable +from collections.abc import Awaitable, Callable, Generator from datetime import datetime from socket import AddressFamily # pylint: disable=no-name-in-module from typing import Any @@ -19,7 +19,6 @@ from samsungtvws.encrypted.remote import SamsungTVEncryptedWSAsyncRemote from samsungtvws.event import ED_INSTALLED_APP_EVENT from samsungtvws.exceptions import ResponseError from samsungtvws.remote import ChannelEmitCommand -from typing_extensions import Generator from homeassistant.components.samsungtv.const import WEBSOCKET_SSL_PORT from homeassistant.core import HomeAssistant, ServiceCall diff --git a/tests/components/sanix/conftest.py b/tests/components/sanix/conftest.py index 86eaa870770..405cad8b60b 100644 --- a/tests/components/sanix/conftest.py +++ b/tests/components/sanix/conftest.py @@ -1,5 +1,6 @@ """Sanix tests configuration.""" +from collections.abc import Generator from datetime import datetime from unittest.mock import AsyncMock, patch from zoneinfo import ZoneInfo @@ -16,7 +17,6 @@ from sanix import ( ATTR_API_TIME, ) from sanix.models import Measurement -from typing_extensions import Generator from homeassistant.components.sanix.const import CONF_SERIAL_NUMBER, DOMAIN from homeassistant.const import CONF_TOKEN diff --git a/tests/components/schlage/conftest.py b/tests/components/schlage/conftest.py index dcb6bc52a7b..9d61bb877d9 100644 --- a/tests/components/schlage/conftest.py +++ b/tests/components/schlage/conftest.py @@ -1,10 +1,10 @@ """Common fixtures for the Schlage tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, Mock, create_autospec, patch from pyschlage.lock import Lock import pytest -from typing_extensions import Generator from homeassistant.components.schlage.const import DOMAIN from homeassistant.const import CONF_PASSWORD, CONF_USERNAME diff --git a/tests/components/scrape/conftest.py b/tests/components/scrape/conftest.py index f6109dbc19a..5b84f4fd44a 100644 --- a/tests/components/scrape/conftest.py +++ b/tests/components/scrape/conftest.py @@ -2,12 +2,12 @@ from __future__ import annotations +from collections.abc import Generator from typing import Any from unittest.mock import AsyncMock, patch import uuid import pytest -from typing_extensions import Generator from homeassistant.components.rest.data import DEFAULT_TIMEOUT from homeassistant.components.rest.schema import DEFAULT_METHOD, DEFAULT_VERIFY_SSL diff --git a/tests/components/screenlogic/test_services.py b/tests/components/screenlogic/test_services.py index d175ea27c84..0fc79fad0e5 100644 --- a/tests/components/screenlogic/test_services.py +++ b/tests/components/screenlogic/test_services.py @@ -1,12 +1,12 @@ """Tests for ScreenLogic integration service calls.""" +from collections.abc import AsyncGenerator from typing import Any from unittest.mock import DEFAULT, AsyncMock, patch import pytest from screenlogicpy import ScreenLogicGateway from screenlogicpy.device_const.system import COLOR_MODE -from typing_extensions import AsyncGenerator from homeassistant.components.screenlogic import DOMAIN from homeassistant.components.screenlogic.const import ( diff --git a/tests/components/season/conftest.py b/tests/components/season/conftest.py index a45a2078d9b..c7458b0a2e1 100644 --- a/tests/components/season/conftest.py +++ b/tests/components/season/conftest.py @@ -2,10 +2,10 @@ from __future__ import annotations +from collections.abc import Generator from unittest.mock import patch import pytest -from typing_extensions import Generator from homeassistant.components.season.const import DOMAIN, TYPE_ASTRONOMICAL from homeassistant.const import CONF_TYPE diff --git a/tests/components/sensor/test_init.py b/tests/components/sensor/test_init.py index 689a91f770d..034360c6cd2 100644 --- a/tests/components/sensor/test_init.py +++ b/tests/components/sensor/test_init.py @@ -2,13 +2,13 @@ from __future__ import annotations +from collections.abc import Generator from datetime import UTC, date, datetime from decimal import Decimal from types import ModuleType from typing import Any import pytest -from typing_extensions import Generator from homeassistant.components import sensor from homeassistant.components.number import NumberDeviceClass diff --git a/tests/components/seventeentrack/conftest.py b/tests/components/seventeentrack/conftest.py index 1ab4eed11ee..180e7b24075 100644 --- a/tests/components/seventeentrack/conftest.py +++ b/tests/components/seventeentrack/conftest.py @@ -1,10 +1,10 @@ """Configuration for 17Track tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch from py17track.package import Package import pytest -from typing_extensions import Generator from homeassistant.components.seventeentrack.const import ( CONF_SHOW_ARCHIVED, diff --git a/tests/components/sfr_box/conftest.py b/tests/components/sfr_box/conftest.py index e86cd06650e..7c1f8bbab5c 100644 --- a/tests/components/sfr_box/conftest.py +++ b/tests/components/sfr_box/conftest.py @@ -1,11 +1,11 @@ """Provide common SFR Box fixtures.""" +from collections.abc import Generator import json from unittest.mock import AsyncMock, patch import pytest from sfrbox_api.models import DslInfo, FtthInfo, SystemInfo, WanInfo -from typing_extensions import Generator from homeassistant.components.sfr_box.const import DOMAIN from homeassistant.config_entries import SOURCE_USER, ConfigEntry diff --git a/tests/components/sfr_box/test_binary_sensor.py b/tests/components/sfr_box/test_binary_sensor.py index 8dba537f6cb..6152f8e2721 100644 --- a/tests/components/sfr_box/test_binary_sensor.py +++ b/tests/components/sfr_box/test_binary_sensor.py @@ -1,11 +1,11 @@ """Test the SFR Box binary sensors.""" +from collections.abc import Generator from unittest.mock import patch import pytest from sfrbox_api.models import SystemInfo from syrupy.assertion import SnapshotAssertion -from typing_extensions import Generator from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform diff --git a/tests/components/sfr_box/test_button.py b/tests/components/sfr_box/test_button.py index 4f20a2f34a3..f555ccebbf9 100644 --- a/tests/components/sfr_box/test_button.py +++ b/tests/components/sfr_box/test_button.py @@ -1,11 +1,11 @@ """Test the SFR Box buttons.""" +from collections.abc import Generator from unittest.mock import patch import pytest from sfrbox_api.exceptions import SFRBoxError from syrupy.assertion import SnapshotAssertion -from typing_extensions import Generator from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS from homeassistant.config_entries import ConfigEntry diff --git a/tests/components/sfr_box/test_diagnostics.py b/tests/components/sfr_box/test_diagnostics.py index 597631d12f1..d31d97cbcf8 100644 --- a/tests/components/sfr_box/test_diagnostics.py +++ b/tests/components/sfr_box/test_diagnostics.py @@ -1,11 +1,11 @@ """Test the SFR Box diagnostics.""" +from collections.abc import Generator from unittest.mock import patch import pytest from sfrbox_api.models import SystemInfo from syrupy.assertion import SnapshotAssertion -from typing_extensions import Generator from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant diff --git a/tests/components/sfr_box/test_init.py b/tests/components/sfr_box/test_init.py index 14688009c5c..19e15491be1 100644 --- a/tests/components/sfr_box/test_init.py +++ b/tests/components/sfr_box/test_init.py @@ -1,10 +1,10 @@ """Test the SFR Box setup process.""" +from collections.abc import Generator from unittest.mock import patch import pytest from sfrbox_api.exceptions import SFRBoxAuthenticationError, SFRBoxError -from typing_extensions import Generator from homeassistant.components.sfr_box.const import DOMAIN from homeassistant.config_entries import ConfigEntry, ConfigEntryState diff --git a/tests/components/sfr_box/test_sensor.py b/tests/components/sfr_box/test_sensor.py index 506e1ed8962..dd4a67b42f6 100644 --- a/tests/components/sfr_box/test_sensor.py +++ b/tests/components/sfr_box/test_sensor.py @@ -1,10 +1,10 @@ """Test the SFR Box sensors.""" +from collections.abc import Generator from unittest.mock import patch import pytest from syrupy.assertion import SnapshotAssertion -from typing_extensions import Generator from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform diff --git a/tests/components/simplisafe/conftest.py b/tests/components/simplisafe/conftest.py index aaf853863e5..12ed845c7d2 100644 --- a/tests/components/simplisafe/conftest.py +++ b/tests/components/simplisafe/conftest.py @@ -1,10 +1,10 @@ """Define test fixtures for SimpliSafe.""" +from collections.abc import AsyncGenerator from unittest.mock import AsyncMock, Mock, patch import pytest from simplipy.system.v3 import SystemV3 -from typing_extensions import AsyncGenerator from homeassistant.components.simplisafe.const import DOMAIN from homeassistant.const import CONF_CODE, CONF_PASSWORD, CONF_TOKEN, CONF_USERNAME diff --git a/tests/components/sleepiq/conftest.py b/tests/components/sleepiq/conftest.py index fd07cc414e7..a9456bd3cc6 100644 --- a/tests/components/sleepiq/conftest.py +++ b/tests/components/sleepiq/conftest.py @@ -2,6 +2,7 @@ from __future__ import annotations +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, create_autospec, patch from asyncsleepiq import ( @@ -17,7 +18,6 @@ from asyncsleepiq import ( SleepIQSleeper, ) import pytest -from typing_extensions import Generator from homeassistant.components.sleepiq import DOMAIN from homeassistant.const import CONF_PASSWORD, CONF_USERNAME diff --git a/tests/components/slimproto/conftest.py b/tests/components/slimproto/conftest.py index ece30d3e5cf..1bb2d7f2628 100644 --- a/tests/components/slimproto/conftest.py +++ b/tests/components/slimproto/conftest.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.components.slimproto.const import DOMAIN diff --git a/tests/components/snapcast/conftest.py b/tests/components/snapcast/conftest.py index e5806ac5f40..bcc0ac5bc30 100644 --- a/tests/components/snapcast/conftest.py +++ b/tests/components/snapcast/conftest.py @@ -1,9 +1,9 @@ """Test the snapcast config flow.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/sonarr/conftest.py b/tests/components/sonarr/conftest.py index 739880a99aa..de7a3f781d7 100644 --- a/tests/components/sonarr/conftest.py +++ b/tests/components/sonarr/conftest.py @@ -1,5 +1,6 @@ """Fixtures for Sonarr integration tests.""" +from collections.abc import Generator import json from unittest.mock import MagicMock, patch @@ -13,7 +14,6 @@ from aiopyarr import ( SystemStatus, ) import pytest -from typing_extensions import Generator from homeassistant.components.sonarr.const import ( CONF_BASE_PATH, diff --git a/tests/components/srp_energy/conftest.py b/tests/components/srp_energy/conftest.py index 45eb726443f..b612bc9f3f3 100644 --- a/tests/components/srp_energy/conftest.py +++ b/tests/components/srp_energy/conftest.py @@ -2,12 +2,12 @@ from __future__ import annotations +from collections.abc import Generator import datetime as dt from unittest.mock import MagicMock, patch from freezegun.api import FrozenDateTimeFactory import pytest -from typing_extensions import Generator from homeassistant.components.srp_energy.const import DOMAIN, PHOENIX_TIME_ZONE from homeassistant.const import CONF_ID diff --git a/tests/components/stream/conftest.py b/tests/components/stream/conftest.py index 3cf3de54940..0142d71a805 100644 --- a/tests/components/stream/conftest.py +++ b/tests/components/stream/conftest.py @@ -13,13 +13,13 @@ so that it can inspect the output. from __future__ import annotations import asyncio +from collections.abc import Generator import logging import threading from unittest.mock import Mock, patch from aiohttp import web import pytest -from typing_extensions import Generator from homeassistant.components.stream.core import StreamOutput from homeassistant.components.stream.worker import StreamState diff --git a/tests/components/streamlabswater/conftest.py b/tests/components/streamlabswater/conftest.py index 5a53c7204fa..1bbdd3e9a08 100644 --- a/tests/components/streamlabswater/conftest.py +++ b/tests/components/streamlabswater/conftest.py @@ -1,10 +1,10 @@ """Common fixtures for the StreamLabs tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest from streamlabswater.streamlabswater import StreamlabsClient -from typing_extensions import Generator from homeassistant.components.streamlabswater import DOMAIN from homeassistant.const import CONF_API_KEY diff --git a/tests/components/stt/test_init.py b/tests/components/stt/test_init.py index d28d9c308a7..ca2685ff827 100644 --- a/tests/components/stt/test_init.py +++ b/tests/components/stt/test_init.py @@ -1,12 +1,11 @@ """Test STT component setup.""" -from collections.abc import AsyncIterable +from collections.abc import AsyncIterable, Generator from http import HTTPStatus from pathlib import Path from unittest.mock import AsyncMock import pytest -from typing_extensions import Generator from homeassistant.components.stt import ( DOMAIN, diff --git a/tests/components/suez_water/conftest.py b/tests/components/suez_water/conftest.py index 51ade6009dc..f218fb7d833 100644 --- a/tests/components/suez_water/conftest.py +++ b/tests/components/suez_water/conftest.py @@ -1,9 +1,9 @@ """Common fixtures for the Suez Water 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/swiss_public_transport/conftest.py b/tests/components/swiss_public_transport/conftest.py index c139b99e54d..88bd233765b 100644 --- a/tests/components/swiss_public_transport/conftest.py +++ b/tests/components/swiss_public_transport/conftest.py @@ -1,9 +1,9 @@ """Common fixtures for the swiss_public_transport 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/switch_as_x/conftest.py b/tests/components/switch_as_x/conftest.py index 88a86892d2d..f8328f38b54 100644 --- a/tests/components/switch_as_x/conftest.py +++ b/tests/components/switch_as_x/conftest.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.core import HomeAssistant from homeassistant.setup import async_setup_component diff --git a/tests/components/switchbot_cloud/conftest.py b/tests/components/switchbot_cloud/conftest.py index ed233ff2de9..b559930dedb 100644 --- a/tests/components/switchbot_cloud/conftest.py +++ b/tests/components/switchbot_cloud/conftest.py @@ -1,9 +1,9 @@ """Common fixtures for the SwitchBot via API 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/switcher_kis/conftest.py b/tests/components/switcher_kis/conftest.py index 8ff395fcab3..2cf123af2b0 100644 --- a/tests/components/switcher_kis/conftest.py +++ b/tests/components/switcher_kis/conftest.py @@ -1,9 +1,9 @@ """Common fixtures and objects for the Switcher integration tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, Mock, patch import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/synology_dsm/conftest.py b/tests/components/synology_dsm/conftest.py index 2f05d0187be..0e8f79ffd40 100644 --- a/tests/components/synology_dsm/conftest.py +++ b/tests/components/synology_dsm/conftest.py @@ -1,9 +1,9 @@ """Configure Synology DSM tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant.core import HomeAssistant from homeassistant.setup import async_setup_component diff --git a/tests/components/systemmonitor/conftest.py b/tests/components/systemmonitor/conftest.py index e16debdf263..209f0e80f81 100644 --- a/tests/components/systemmonitor/conftest.py +++ b/tests/components/systemmonitor/conftest.py @@ -2,13 +2,13 @@ from __future__ import annotations +from collections.abc import Generator import socket from unittest.mock import AsyncMock, Mock, NonCallableMock, patch from psutil import NoSuchProcess, Process from psutil._common import sdiskpart, sdiskusage, shwtemp, snetio, snicaddr, sswap import pytest -from typing_extensions import Generator from homeassistant.components.systemmonitor.const import DOMAIN from homeassistant.components.systemmonitor.coordinator import VirtualMemory diff --git a/tests/components/tailscale/conftest.py b/tests/components/tailscale/conftest.py index cb7419daf89..5514678f530 100644 --- a/tests/components/tailscale/conftest.py +++ b/tests/components/tailscale/conftest.py @@ -2,11 +2,11 @@ from __future__ import annotations +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch import pytest from tailscale.models import Devices -from typing_extensions import Generator from homeassistant.components.tailscale.const import CONF_TAILNET, DOMAIN from homeassistant.const import CONF_API_KEY diff --git a/tests/components/tailwind/conftest.py b/tests/components/tailwind/conftest.py index f23463548bc..ce49926cd2a 100644 --- a/tests/components/tailwind/conftest.py +++ b/tests/components/tailwind/conftest.py @@ -2,11 +2,11 @@ from __future__ import annotations +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch from gotailwind import TailwindDeviceStatus import pytest -from typing_extensions import Generator from homeassistant.components.tailwind.const import DOMAIN from homeassistant.const import CONF_HOST, CONF_TOKEN diff --git a/tests/components/tami4/conftest.py b/tests/components/tami4/conftest.py index 84b96c04735..2f4201d9a9e 100644 --- a/tests/components/tami4/conftest.py +++ b/tests/components/tami4/conftest.py @@ -1,5 +1,6 @@ """Common fixutres with default mocks as well as common test helper methods.""" +from collections.abc import Generator from datetime import datetime from unittest.mock import AsyncMock, MagicMock, patch @@ -7,7 +8,6 @@ import pytest from Tami4EdgeAPI.device import Device from Tami4EdgeAPI.device_metadata import DeviceMetadata from Tami4EdgeAPI.water_quality import UV, Filter, WaterQuality -from typing_extensions import Generator from homeassistant.components.tami4.const import CONF_REFRESH_TOKEN, DOMAIN from homeassistant.core import HomeAssistant diff --git a/tests/components/tankerkoenig/conftest.py b/tests/components/tankerkoenig/conftest.py index 8f2e2c2fb53..1517c3d2060 100644 --- a/tests/components/tankerkoenig/conftest.py +++ b/tests/components/tankerkoenig/conftest.py @@ -1,9 +1,9 @@ """Fixtures for Tankerkoenig integration tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.tankerkoenig import DOMAIN from homeassistant.const import CONF_SHOW_ON_MAP diff --git a/tests/components/technove/conftest.py b/tests/components/technove/conftest.py index be34ebfefa5..a81575f1edf 100644 --- a/tests/components/technove/conftest.py +++ b/tests/components/technove/conftest.py @@ -1,10 +1,10 @@ """Fixtures for TechnoVE integration tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch import pytest from technove import Station as TechnoVEStation -from typing_extensions import Generator from homeassistant.components.technove.const import DOMAIN from homeassistant.const import CONF_HOST diff --git a/tests/components/tedee/conftest.py b/tests/components/tedee/conftest.py index 295e34fd541..68444de640c 100644 --- a/tests/components/tedee/conftest.py +++ b/tests/components/tedee/conftest.py @@ -2,13 +2,13 @@ from __future__ import annotations +from collections.abc import Generator import json from unittest.mock import AsyncMock, MagicMock, patch from pytedee_async.bridge import TedeeBridge from pytedee_async.lock import TedeeLock import pytest -from typing_extensions import Generator from homeassistant.components.tedee.const import CONF_LOCAL_ACCESS_TOKEN, DOMAIN from homeassistant.const import CONF_HOST, CONF_WEBHOOK_ID diff --git a/tests/components/time_date/conftest.py b/tests/components/time_date/conftest.py index 4bcaa887b6f..7841b6d0b83 100644 --- a/tests/components/time_date/conftest.py +++ b/tests/components/time_date/conftest.py @@ -1,9 +1,9 @@ """Fixtures for Time & Date integration 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/todo/test_init.py b/tests/components/todo/test_init.py index 5999b4b9fbe..cbb61434f1a 100644 --- a/tests/components/todo/test_init.py +++ b/tests/components/todo/test_init.py @@ -1,12 +1,12 @@ """Tests for the todo integration.""" +from collections.abc import Generator import datetime from typing import Any from unittest.mock import AsyncMock import zoneinfo import pytest -from typing_extensions import Generator import voluptuous as vol from homeassistant.components import conversation diff --git a/tests/components/todoist/conftest.py b/tests/components/todoist/conftest.py index 386385a0ddb..45fda53ccc1 100644 --- a/tests/components/todoist/conftest.py +++ b/tests/components/todoist/conftest.py @@ -1,5 +1,6 @@ """Common fixtures for the todoist tests.""" +from collections.abc import Generator from http import HTTPStatus from unittest.mock import AsyncMock, patch @@ -7,7 +8,6 @@ import pytest from requests.exceptions import HTTPError from requests.models import Response from todoist_api_python.models import Collaborator, Due, Label, Project, Task -from typing_extensions import Generator from homeassistant.components.todoist import DOMAIN from homeassistant.const import CONF_TOKEN, Platform diff --git a/tests/components/tplink/conftest.py b/tests/components/tplink/conftest.py index f8d933de71e..ad7c85fa728 100644 --- a/tests/components/tplink/conftest.py +++ b/tests/components/tplink/conftest.py @@ -1,10 +1,10 @@ """tplink conftest.""" +from collections.abc import Generator import copy from unittest.mock import DEFAULT, AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.tplink import DOMAIN from homeassistant.core import HomeAssistant diff --git a/tests/components/tplink_omada/conftest.py b/tests/components/tplink_omada/conftest.py index c29fcb633e4..aef51bce87c 100644 --- a/tests/components/tplink_omada/conftest.py +++ b/tests/components/tplink_omada/conftest.py @@ -1,6 +1,6 @@ """Test fixtures for TP-Link Omada integration.""" -from collections.abc import AsyncIterable +from collections.abc import AsyncIterable, Generator import json from unittest.mock import AsyncMock, MagicMock, patch @@ -17,7 +17,6 @@ from tplink_omada_client.devices import ( OmadaSwitch, OmadaSwitchPortDetails, ) -from typing_extensions import Generator from homeassistant.components.tplink_omada.config_flow import CONF_SITE from homeassistant.components.tplink_omada.const import DOMAIN diff --git a/tests/components/traccar_server/conftest.py b/tests/components/traccar_server/conftest.py index 6a8e428e7a2..0013b3249bd 100644 --- a/tests/components/traccar_server/conftest.py +++ b/tests/components/traccar_server/conftest.py @@ -1,10 +1,10 @@ """Common fixtures for the Traccar Server tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest from pytraccar import ApiClient, SubscriptionStatus -from typing_extensions import Generator from homeassistant.components.traccar_server.const import ( CONF_CUSTOM_ATTRIBUTES, diff --git a/tests/components/traccar_server/test_config_flow.py b/tests/components/traccar_server/test_config_flow.py index 5da6f592957..62f39f00dc1 100644 --- a/tests/components/traccar_server/test_config_flow.py +++ b/tests/components/traccar_server/test_config_flow.py @@ -1,11 +1,11 @@ """Test the Traccar Server config flow.""" +from collections.abc import Generator from typing import Any from unittest.mock import AsyncMock import pytest from pytraccar import TraccarException -from typing_extensions import Generator from homeassistant import config_entries from homeassistant.components.traccar.device_tracker import PLATFORM_SCHEMA diff --git a/tests/components/traccar_server/test_diagnostics.py b/tests/components/traccar_server/test_diagnostics.py index 15d74ef9ef5..738fea1a45d 100644 --- a/tests/components/traccar_server/test_diagnostics.py +++ b/tests/components/traccar_server/test_diagnostics.py @@ -1,9 +1,9 @@ """Test Traccar Server diagnostics.""" +from collections.abc import Generator from unittest.mock import AsyncMock from syrupy import SnapshotAssertion -from typing_extensions import Generator from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr, entity_registry as er diff --git a/tests/components/tractive/conftest.py b/tests/components/tractive/conftest.py index 9a17a557c49..7f319a87b5b 100644 --- a/tests/components/tractive/conftest.py +++ b/tests/components/tractive/conftest.py @@ -1,12 +1,12 @@ """Common fixtures for the Tractive tests.""" +from collections.abc import Generator from typing import Any from unittest.mock import AsyncMock, Mock, patch from aiotractive.trackable_object import TrackableObject from aiotractive.tracker import Tracker import pytest -from typing_extensions import Generator from homeassistant.components.tractive.const import DOMAIN, SERVER_UNAVAILABLE from homeassistant.const import CONF_EMAIL, CONF_PASSWORD diff --git a/tests/components/tradfri/conftest.py b/tests/components/tradfri/conftest.py index 08afe77b4a3..4b0b742850b 100644 --- a/tests/components/tradfri/conftest.py +++ b/tests/components/tradfri/conftest.py @@ -2,7 +2,7 @@ from __future__ import annotations -from collections.abc import Callable +from collections.abc import Callable, Generator import json from typing import Any from unittest.mock import AsyncMock, MagicMock, patch @@ -12,7 +12,6 @@ from pytradfri.command import Command from pytradfri.const import ATTR_FIRMWARE_VERSION, ATTR_GATEWAY_ID from pytradfri.device import Device from pytradfri.gateway import Gateway -from typing_extensions import Generator from homeassistant.components.tradfri.const import DOMAIN diff --git a/tests/components/tts/common.py b/tests/components/tts/common.py index b99e6400273..1331f441940 100644 --- a/tests/components/tts/common.py +++ b/tests/components/tts/common.py @@ -2,13 +2,13 @@ from __future__ import annotations +from collections.abc import Generator from http import HTTPStatus from pathlib import Path from typing import Any from unittest.mock import MagicMock, patch import pytest -from typing_extensions import Generator import voluptuous as vol from homeassistant.components import media_source diff --git a/tests/components/tts/conftest.py b/tests/components/tts/conftest.py index b8abb086260..d9a4499f544 100644 --- a/tests/components/tts/conftest.py +++ b/tests/components/tts/conftest.py @@ -3,11 +3,11 @@ From http://doc.pytest.org/en/latest/example/simple.html#making-test-result-information-available-in-fixtures """ +from collections.abc import Generator from pathlib import Path from unittest.mock import MagicMock import pytest -from typing_extensions import Generator from homeassistant.config import async_process_ha_core_config from homeassistant.config_entries import ConfigFlow diff --git a/tests/components/tuya/conftest.py b/tests/components/tuya/conftest.py index 981e12ecceb..380209fd5ef 100644 --- a/tests/components/tuya/conftest.py +++ b/tests/components/tuya/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.tuya.const import CONF_APP_TYPE, CONF_USER_CODE, DOMAIN diff --git a/tests/components/twentemilieu/conftest.py b/tests/components/twentemilieu/conftest.py index 7b157572824..7ecf1657ce9 100644 --- a/tests/components/twentemilieu/conftest.py +++ b/tests/components/twentemilieu/conftest.py @@ -2,12 +2,12 @@ from __future__ import annotations +from collections.abc import Generator from datetime import date from unittest.mock import MagicMock, patch import pytest from twentemilieu import WasteType -from typing_extensions import Generator from homeassistant.components.twentemilieu.const import ( CONF_HOUSE_LETTER, diff --git a/tests/components/twitch/conftest.py b/tests/components/twitch/conftest.py index 6c243a8dbbf..25e443c2778 100644 --- a/tests/components/twitch/conftest.py +++ b/tests/components/twitch/conftest.py @@ -1,11 +1,11 @@ """Configure tests for the Twitch integration.""" +from collections.abc import Generator import time from unittest.mock import AsyncMock, patch import pytest from twitchAPI.object.api import FollowedChannel, Stream, TwitchUser, UserSubscription -from typing_extensions import Generator from homeassistant.components.application_credentials import ( ClientCredential, diff --git a/tests/components/ukraine_alarm/test_config_flow.py b/tests/components/ukraine_alarm/test_config_flow.py index 58b5dde2bac..de9bdd618de 100644 --- a/tests/components/ukraine_alarm/test_config_flow.py +++ b/tests/components/ukraine_alarm/test_config_flow.py @@ -1,10 +1,10 @@ """Test the Ukraine Alarm config flow.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch from aiohttp import ClientConnectionError, ClientError, ClientResponseError, RequestInfo import pytest -from typing_extensions import Generator from yarl import URL from homeassistant import config_entries diff --git a/tests/components/unifi/conftest.py b/tests/components/unifi/conftest.py index 4a7d86eea38..f1ebe84c350 100644 --- a/tests/components/unifi/conftest.py +++ b/tests/components/unifi/conftest.py @@ -3,7 +3,7 @@ from __future__ import annotations import asyncio -from collections.abc import Callable +from collections.abc import Callable, Generator from datetime import timedelta from types import MappingProxyType from typing import Any @@ -12,7 +12,6 @@ from unittest.mock import AsyncMock, patch from aiounifi.models.message import MessageKey import orjson import pytest -from typing_extensions import Generator from homeassistant.components.unifi import STORAGE_KEY, STORAGE_VERSION from homeassistant.components.unifi.const import CONF_SITE_ID, DOMAIN as UNIFI_DOMAIN diff --git a/tests/components/update/test_init.py b/tests/components/update/test_init.py index b37abc2263a..7860c679f37 100644 --- a/tests/components/update/test_init.py +++ b/tests/components/update/test_init.py @@ -1,9 +1,9 @@ """The tests for the Update component.""" +from collections.abc import Generator from unittest.mock import MagicMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.update import ( ATTR_BACKUP, diff --git a/tests/components/uptime/conftest.py b/tests/components/uptime/conftest.py index 2fe96b91b63..008172dc35a 100644 --- a/tests/components/uptime/conftest.py +++ b/tests/components/uptime/conftest.py @@ -2,10 +2,10 @@ from __future__ import annotations +from collections.abc import Generator from unittest.mock import patch import pytest -from typing_extensions import Generator from homeassistant.components.uptime.const import DOMAIN from homeassistant.core import HomeAssistant diff --git a/tests/components/v2c/conftest.py b/tests/components/v2c/conftest.py index 1803298be28..5c7db8bbab3 100644 --- a/tests/components/v2c/conftest.py +++ b/tests/components/v2c/conftest.py @@ -1,10 +1,10 @@ """Common fixtures for the V2C tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest from pytrydan.models.trydan import TrydanData -from typing_extensions import Generator from homeassistant.components.v2c.const import DOMAIN from homeassistant.const import CONF_HOST diff --git a/tests/components/vacuum/conftest.py b/tests/components/vacuum/conftest.py index 5167c868f9f..d298260c575 100644 --- a/tests/components/vacuum/conftest.py +++ b/tests/components/vacuum/conftest.py @@ -1,7 +1,8 @@ """Fixtures for Vacuum 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/valve/test_init.py b/tests/components/valve/test_init.py index 3ef3b1ff4b0..e4519bcef08 100644 --- a/tests/components/valve/test_init.py +++ b/tests/components/valve/test_init.py @@ -1,8 +1,9 @@ """The tests for Valve.""" +from collections.abc import Generator + import pytest from syrupy.assertion import SnapshotAssertion -from typing_extensions import Generator from homeassistant.components.valve import ( DOMAIN, diff --git a/tests/components/velbus/conftest.py b/tests/components/velbus/conftest.py index 3d59ad615c6..402acb821be 100644 --- a/tests/components/velbus/conftest.py +++ b/tests/components/velbus/conftest.py @@ -1,9 +1,9 @@ """Fixtures for the Velbus tests.""" +from collections.abc import Generator from unittest.mock import MagicMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.velbus.const import DOMAIN from homeassistant.config_entries import ConfigEntry diff --git a/tests/components/velbus/test_config_flow.py b/tests/components/velbus/test_config_flow.py index 59effcae706..432fcea10db 100644 --- a/tests/components/velbus/test_config_flow.py +++ b/tests/components/velbus/test_config_flow.py @@ -1,10 +1,10 @@ """Tests for the Velbus config flow.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch import pytest import serial.tools.list_ports -from typing_extensions import Generator from velbusaio.exceptions import VelbusConnectionFailed from homeassistant.components import usb diff --git a/tests/components/velux/conftest.py b/tests/components/velux/conftest.py index 692216827b2..512b2a007ed 100644 --- a/tests/components/velux/conftest.py +++ b/tests/components/velux/conftest.py @@ -1,9 +1,9 @@ """Configuration for Velux 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/verisure/conftest.py b/tests/components/verisure/conftest.py index 03086ac2ead..5aafcda2bb3 100644 --- a/tests/components/verisure/conftest.py +++ b/tests/components/verisure/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.verisure.const import CONF_GIID, DOMAIN from homeassistant.const import CONF_EMAIL, CONF_PASSWORD diff --git a/tests/components/vicare/conftest.py b/tests/components/vicare/conftest.py index 6899839a0e1..372314d9fe2 100644 --- a/tests/components/vicare/conftest.py +++ b/tests/components/vicare/conftest.py @@ -2,13 +2,13 @@ from __future__ import annotations +from collections.abc import AsyncGenerator, Generator from dataclasses import dataclass from unittest.mock import AsyncMock, Mock, patch import pytest from PyViCare.PyViCareDeviceConfig import PyViCareDeviceConfig from PyViCare.PyViCareService import ViCareDeviceAccessor, readFeature -from typing_extensions import AsyncGenerator, Generator from homeassistant.components.vicare.const import DOMAIN from homeassistant.core import HomeAssistant diff --git a/tests/components/vilfo/conftest.py b/tests/components/vilfo/conftest.py index 11b620b82e0..fbc48da28b3 100644 --- a/tests/components/vilfo/conftest.py +++ b/tests/components/vilfo/conftest.py @@ -1,9 +1,9 @@ """Vilfo tests conftest.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.vilfo import DOMAIN from homeassistant.const import CONF_ACCESS_TOKEN, CONF_HOST diff --git a/tests/components/wake_on_lan/conftest.py b/tests/components/wake_on_lan/conftest.py index cec3076d83e..c3c58ec4c69 100644 --- a/tests/components/wake_on_lan/conftest.py +++ b/tests/components/wake_on_lan/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 @pytest.fixture diff --git a/tests/components/wake_word/test_init.py b/tests/components/wake_word/test_init.py index c19d3e7032f..cdaf7e0e3f0 100644 --- a/tests/components/wake_word/test_init.py +++ b/tests/components/wake_word/test_init.py @@ -1,14 +1,13 @@ """Test wake_word component setup.""" import asyncio -from collections.abc import AsyncIterable +from collections.abc import AsyncIterable, Generator from functools import partial from pathlib import Path from unittest.mock import patch from freezegun import freeze_time import pytest -from typing_extensions import Generator from homeassistant.components import wake_word from homeassistant.config_entries import ConfigEntry, ConfigEntryState, ConfigFlow diff --git a/tests/components/waqi/conftest.py b/tests/components/waqi/conftest.py index b2e1a7d77d4..75709d4f56e 100644 --- a/tests/components/waqi/conftest.py +++ b/tests/components/waqi/conftest.py @@ -1,9 +1,9 @@ """Common fixtures for the World Air Quality Index (WAQI) tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.waqi.const import CONF_STATION_NUMBER, DOMAIN from homeassistant.const import CONF_API_KEY diff --git a/tests/components/water_heater/conftest.py b/tests/components/water_heater/conftest.py index 619d5e5c359..df16e5cc6da 100644 --- a/tests/components/water_heater/conftest.py +++ b/tests/components/water_heater/conftest.py @@ -1,7 +1,8 @@ """Fixtures for water heater 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/weather/conftest.py b/tests/components/weather/conftest.py index e3e790300a0..78389381ff3 100644 --- a/tests/components/weather/conftest.py +++ b/tests/components/weather/conftest.py @@ -1,7 +1,8 @@ """Fixtures for Weather 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/weatherflow/conftest.py b/tests/components/weatherflow/conftest.py index c0811597228..21c251d39b5 100644 --- a/tests/components/weatherflow/conftest.py +++ b/tests/components/weatherflow/conftest.py @@ -1,12 +1,12 @@ """Fixtures for Weatherflow integration tests.""" import asyncio +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest from pyweatherflowudp.client import EVENT_DEVICE_DISCOVERED from pyweatherflowudp.device import WeatherFlowDevice -from typing_extensions import Generator from homeassistant.components.weatherflow.const import DOMAIN diff --git a/tests/components/weatherflow_cloud/conftest.py b/tests/components/weatherflow_cloud/conftest.py index d47da3c7d1b..222d487393a 100644 --- a/tests/components/weatherflow_cloud/conftest.py +++ b/tests/components/weatherflow_cloud/conftest.py @@ -1,10 +1,10 @@ """Common fixtures for the WeatherflowCloud tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, Mock, patch from aiohttp import ClientResponseError import pytest -from typing_extensions import Generator @pytest.fixture diff --git a/tests/components/weatherkit/conftest.py b/tests/components/weatherkit/conftest.py index d4b849115f6..14d96d28347 100644 --- a/tests/components/weatherkit/conftest.py +++ b/tests/components/weatherkit/conftest.py @@ -1,9 +1,9 @@ """Common fixtures for the Apple WeatherKit 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/webmin/conftest.py b/tests/components/webmin/conftest.py index c3ad43510d5..388297f9665 100644 --- a/tests/components/webmin/conftest.py +++ b/tests/components/webmin/conftest.py @@ -1,9 +1,9 @@ """Fixtures for Webmin integration tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant.components.webmin.const import DEFAULT_PORT, DOMAIN from homeassistant.const import ( diff --git a/tests/components/webostv/conftest.py b/tests/components/webostv/conftest.py index 2b5d701f899..d25d1c7b031 100644 --- a/tests/components/webostv/conftest.py +++ b/tests/components/webostv/conftest.py @@ -1,9 +1,9 @@ """Common fixtures and objects for the LG webOS integration tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, Mock, patch import pytest -from typing_extensions import Generator from homeassistant.components.webostv.const import LIVE_TV_APP_ID from homeassistant.core import HomeAssistant, ServiceCall diff --git a/tests/components/whois/conftest.py b/tests/components/whois/conftest.py index 5fe420abb92..1c779cce671 100644 --- a/tests/components/whois/conftest.py +++ b/tests/components/whois/conftest.py @@ -2,11 +2,11 @@ from __future__ import annotations +from collections.abc import Generator from datetime import datetime from unittest.mock import AsyncMock, MagicMock, Mock, patch import pytest -from typing_extensions import Generator from homeassistant.components.whois.const import DOMAIN from homeassistant.const import CONF_DOMAIN diff --git a/tests/components/wiffi/conftest.py b/tests/components/wiffi/conftest.py index 5f16d676e81..2383906291f 100644 --- a/tests/components/wiffi/conftest.py +++ b/tests/components/wiffi/conftest.py @@ -1,9 +1,9 @@ """Configuration for Wiffi 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/wled/conftest.py b/tests/components/wled/conftest.py index 0d839fc8666..2cf909ca664 100644 --- a/tests/components/wled/conftest.py +++ b/tests/components/wled/conftest.py @@ -1,10 +1,10 @@ """Fixtures for WLED integration tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, patch from freezegun.api import FrozenDateTimeFactory import pytest -from typing_extensions import Generator from wled import Device as WLEDDevice from homeassistant.components.wled.const import DOMAIN diff --git a/tests/components/workday/conftest.py b/tests/components/workday/conftest.py index 33bf98f90c3..081d6ce90db 100644 --- a/tests/components/workday/conftest.py +++ b/tests/components/workday/conftest.py @@ -1,9 +1,9 @@ """Fixtures for Workday integration 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/wyoming/conftest.py b/tests/components/wyoming/conftest.py index 47ef0566dc6..f6093e34261 100644 --- a/tests/components/wyoming/conftest.py +++ b/tests/components/wyoming/conftest.py @@ -1,10 +1,10 @@ """Common fixtures for the Wyoming tests.""" +from collections.abc import Generator from pathlib import Path from unittest.mock import AsyncMock, patch import pytest -from typing_extensions import Generator from homeassistant.components import stt from homeassistant.components.wyoming import DOMAIN diff --git a/tests/components/xiaomi_ble/conftest.py b/tests/components/xiaomi_ble/conftest.py index bb74b3c7af3..8994aec813c 100644 --- a/tests/components/xiaomi_ble/conftest.py +++ b/tests/components/xiaomi_ble/conftest.py @@ -1,9 +1,9 @@ """Session fixtures.""" +from collections.abc import Generator from unittest import mock import pytest -from typing_extensions import Generator class MockServices: diff --git a/tests/components/xiaomi_miio/test_vacuum.py b/tests/components/xiaomi_miio/test_vacuum.py index 462145d16ab..54646d30513 100644 --- a/tests/components/xiaomi_miio/test_vacuum.py +++ b/tests/components/xiaomi_miio/test_vacuum.py @@ -1,12 +1,12 @@ """The tests for the Xiaomi vacuum platform.""" +from collections.abc import Generator from datetime import datetime, time, timedelta from unittest import mock from unittest.mock import MagicMock, patch from miio import DeviceException import pytest -from typing_extensions import Generator from homeassistant.components.vacuum import ( ATTR_BATTERY_ICON, diff --git a/tests/components/yardian/conftest.py b/tests/components/yardian/conftest.py index 26a01f889b7..00e76c4c34f 100644 --- a/tests/components/yardian/conftest.py +++ b/tests/components/yardian/conftest.py @@ -1,9 +1,9 @@ """Common fixtures for the Yardian 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/zamg/conftest.py b/tests/components/zamg/conftest.py index 1795baa7fad..9fa4f333ef8 100644 --- a/tests/components/zamg/conftest.py +++ b/tests/components/zamg/conftest.py @@ -1,10 +1,10 @@ """Fixtures for Zamg integration tests.""" +from collections.abc import Generator import json from unittest.mock import MagicMock, patch import pytest -from typing_extensions import Generator from zamg import ZamgData as ZamgDevice from homeassistant.components.zamg.const import CONF_STATION_ID, DOMAIN diff --git a/tests/components/zha/conftest.py b/tests/components/zha/conftest.py index 410eaceda76..5658e995a11 100644 --- a/tests/components/zha/conftest.py +++ b/tests/components/zha/conftest.py @@ -1,6 +1,6 @@ """Test configuration for the ZHA component.""" -from collections.abc import Callable +from collections.abc import Callable, Generator import itertools import time from typing import Any @@ -8,7 +8,6 @@ from unittest.mock import AsyncMock, MagicMock, create_autospec, patch import warnings import pytest -from typing_extensions import Generator import zigpy from zigpy.application import ControllerApplication import zigpy.backups diff --git a/tests/components/zha/test_radio_manager.py b/tests/components/zha/test_radio_manager.py index 280b3d05daf..5e92991cbb4 100644 --- a/tests/components/zha/test_radio_manager.py +++ b/tests/components/zha/test_radio_manager.py @@ -1,10 +1,10 @@ """Tests for ZHA config flow.""" +from collections.abc import Generator from unittest.mock import AsyncMock, MagicMock, create_autospec, patch import pytest import serial.tools.list_ports -from typing_extensions import Generator from zigpy.backups import BackupManager import zigpy.config from zigpy.config import CONF_DEVICE_PATH diff --git a/tests/components/zha/test_registries.py b/tests/components/zha/test_registries.py index 2b1c0dcc561..7d1831650f3 100644 --- a/tests/components/zha/test_registries.py +++ b/tests/components/zha/test_registries.py @@ -2,10 +2,10 @@ from __future__ import annotations +from collections.abc import Generator from unittest import mock import pytest -from typing_extensions import Generator import zigpy.quirks as zigpy_quirks from homeassistant.components.zha.binary_sensor import IASZone diff --git a/tests/components/zwave_js/test_config_flow.py b/tests/components/zwave_js/test_config_flow.py index 10fd5edfabb..9b792fcb500 100644 --- a/tests/components/zwave_js/test_config_flow.py +++ b/tests/components/zwave_js/test_config_flow.py @@ -1,6 +1,7 @@ """Test the Z-Wave JS config flow.""" import asyncio +from collections.abc import Generator from copy import copy from ipaddress import ip_address from unittest.mock import DEFAULT, MagicMock, call, patch @@ -8,7 +9,6 @@ from unittest.mock import DEFAULT, MagicMock, call, patch import aiohttp import pytest from serial.tools.list_ports_common import ListPortInfo -from typing_extensions import Generator from zwave_js_server.version import VersionInfo from homeassistant import config_entries