diff --git a/tests/components/airthings_ble/conftest.py b/tests/components/airthings_ble/conftest.py index 3df082c4361..44f68a1c8ae 100644 --- a/tests/components/airthings_ble/conftest.py +++ b/tests/components/airthings_ble/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/aranet/conftest.py b/tests/components/aranet/conftest.py index fca081d2e2a..da5c3c81404 100644 --- a/tests/components/aranet/conftest.py +++ b/tests/components/aranet/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/bluemaestro/conftest.py b/tests/components/bluemaestro/conftest.py index e40cf1e30f4..f35ff087ed3 100644 --- a/tests/components/bluemaestro/conftest.py +++ b/tests/components/bluemaestro/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/bluetooth_adapters/conftest.py b/tests/components/bluetooth_adapters/conftest.py index 9e56959209e..c0a5766d032 100644 --- a/tests/components/bluetooth_adapters/conftest.py +++ b/tests/components/bluetooth_adapters/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/bluetooth_le_tracker/conftest.py b/tests/components/bluetooth_le_tracker/conftest.py index 9fce8e85ea8..5a839a9d6b8 100644 --- a/tests/components/bluetooth_le_tracker/conftest.py +++ b/tests/components/bluetooth_le_tracker/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/bthome/conftest.py b/tests/components/bthome/conftest.py index 9fce8e85ea8..5a839a9d6b8 100644 --- a/tests/components/bthome/conftest.py +++ b/tests/components/bthome/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/dormakaba_dkey/conftest.py b/tests/components/dormakaba_dkey/conftest.py index d911739943f..1530cb82e33 100644 --- a/tests/components/dormakaba_dkey/conftest.py +++ b/tests/components/dormakaba_dkey/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/eq3btsmart/conftest.py b/tests/components/eq3btsmart/conftest.py index b16c5088044..92f1be29b70 100644 --- a/tests/components/eq3btsmart/conftest.py +++ b/tests/components/eq3btsmart/conftest.py @@ -11,7 +11,7 @@ from tests.components.bluetooth import generate_ble_device @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/esphome/conftest.py b/tests/components/esphome/conftest.py index f71b4196be6..7b9b050ddb3 100644 --- a/tests/components/esphome/conftest.py +++ b/tests/components/esphome/conftest.py @@ -41,7 +41,7 @@ from tests.common import MockConfigEntry @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/eufylife_ble/conftest.py b/tests/components/eufylife_ble/conftest.py index 18f5a0ec3a1..210f3dbed69 100644 --- a/tests/components/eufylife_ble/conftest.py +++ b/tests/components/eufylife_ble/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/fjaraskupan/conftest.py b/tests/components/fjaraskupan/conftest.py index 85493157a3c..1f29b086955 100644 --- a/tests/components/fjaraskupan/conftest.py +++ b/tests/components/fjaraskupan/conftest.py @@ -6,5 +6,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/govee_ble/conftest.py b/tests/components/govee_ble/conftest.py index 382854a5a28..0185cd9557f 100644 --- a/tests/components/govee_ble/conftest.py +++ b/tests/components/govee_ble/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/ibeacon/test_coordinator.py b/tests/components/ibeacon/test_coordinator.py index 0880f745ec2..c9177362f35 100644 --- a/tests/components/ibeacon/test_coordinator.py +++ b/tests/components/ibeacon/test_coordinator.py @@ -40,7 +40,7 @@ from tests.components.bluetooth import ( @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/ibeacon/test_device_tracker.py b/tests/components/ibeacon/test_device_tracker.py index 481a1315325..e34cc480cb0 100644 --- a/tests/components/ibeacon/test_device_tracker.py +++ b/tests/components/ibeacon/test_device_tracker.py @@ -42,7 +42,7 @@ from tests.components.bluetooth import ( @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/ibeacon/test_init.py b/tests/components/ibeacon/test_init.py index 5a30417efe1..0604b818acd 100644 --- a/tests/components/ibeacon/test_init.py +++ b/tests/components/ibeacon/test_init.py @@ -15,7 +15,7 @@ from tests.typing import WebSocketGenerator @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/ibeacon/test_sensor.py b/tests/components/ibeacon/test_sensor.py index fb6322162d4..f4dba57bced 100644 --- a/tests/components/ibeacon/test_sensor.py +++ b/tests/components/ibeacon/test_sensor.py @@ -34,7 +34,7 @@ from tests.components.bluetooth import ( @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/idasen_desk/conftest.py b/tests/components/idasen_desk/conftest.py index c621a54cd95..d99409f8bb2 100644 --- a/tests/components/idasen_desk/conftest.py +++ b/tests/components/idasen_desk/conftest.py @@ -1,6 +1,6 @@ """IKEA Idasen Desk fixtures.""" -from collections.abc import Callable +from collections.abc import Callable, Generator from unittest import mock from unittest.mock import AsyncMock, MagicMock @@ -8,12 +8,12 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> Generator[None, None, None]: """Auto mock bluetooth.""" with mock.patch( "homeassistant.components.idasen_desk.bluetooth.async_ble_device_from_address" ): - yield MagicMock() + yield @pytest.fixture(autouse=False) diff --git a/tests/components/improv_ble/conftest.py b/tests/components/improv_ble/conftest.py index ea548efeb15..3781be341c5 100644 --- a/tests/components/improv_ble/conftest.py +++ b/tests/components/improv_ble/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/inkbird/conftest.py b/tests/components/inkbird/conftest.py index 3450cb933fe..cb68332dd83 100644 --- a/tests/components/inkbird/conftest.py +++ b/tests/components/inkbird/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/kegtron/conftest.py b/tests/components/kegtron/conftest.py index 472cadddada..44728e0e5ce 100644 --- a/tests/components/kegtron/conftest.py +++ b/tests/components/kegtron/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/keymitt_ble/conftest.py b/tests/components/keymitt_ble/conftest.py index 3df082c4361..44f68a1c8ae 100644 --- a/tests/components/keymitt_ble/conftest.py +++ b/tests/components/keymitt_ble/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/lamarzocco/conftest.py b/tests/components/lamarzocco/conftest.py index d76e44d60af..5c0f344a640 100644 --- a/tests/components/lamarzocco/conftest.py +++ b/tests/components/lamarzocco/conftest.py @@ -133,5 +133,5 @@ def remove_local_connection( @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/ld2410_ble/conftest.py b/tests/components/ld2410_ble/conftest.py index 58dca37ce83..3e9b4f872a2 100644 --- a/tests/components/ld2410_ble/conftest.py +++ b/tests/components/ld2410_ble/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/leaone/conftest.py b/tests/components/leaone/conftest.py index 2f89e80f893..c2bfa61117a 100644 --- a/tests/components/leaone/conftest.py +++ b/tests/components/leaone/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/led_ble/conftest.py b/tests/components/led_ble/conftest.py index 280eb0d6f17..aaaa561b66e 100644 --- a/tests/components/led_ble/conftest.py +++ b/tests/components/led_ble/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/medcom_ble/conftest.py b/tests/components/medcom_ble/conftest.py index 7c5b0dad22e..41f797f3e1d 100644 --- a/tests/components/medcom_ble/conftest.py +++ b/tests/components/medcom_ble/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/melnor/conftest.py b/tests/components/melnor/conftest.py index b75eb370555..d96a04aa3f7 100644 --- a/tests/components/melnor/conftest.py +++ b/tests/components/melnor/conftest.py @@ -57,7 +57,7 @@ FAKE_SERVICE_INFO_2 = BluetoothServiceInfoBleak( @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/moat/conftest.py b/tests/components/moat/conftest.py index 1f7f00c8d2f..2161d304d63 100644 --- a/tests/components/moat/conftest.py +++ b/tests/components/moat/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/mopeka/conftest.py b/tests/components/mopeka/conftest.py index 1d6d0fc7eb7..d231390845e 100644 --- a/tests/components/mopeka/conftest.py +++ b/tests/components/mopeka/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/oralb/conftest.py b/tests/components/oralb/conftest.py index 690444d3fb1..f119d6b22b3 100644 --- a/tests/components/oralb/conftest.py +++ b/tests/components/oralb/conftest.py @@ -1,5 +1,6 @@ """OralB session fixtures.""" +from collections.abc import Generator from unittest import mock import pytest @@ -44,7 +45,7 @@ class MockBleakClientBattery49(MockBleakClient): @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> Generator[None, None, None]: """Auto mock bluetooth.""" with mock.patch( diff --git a/tests/components/qingping/conftest.py b/tests/components/qingping/conftest.py index e74bf38b26d..21667684562 100644 --- a/tests/components/qingping/conftest.py +++ b/tests/components/qingping/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/rapt_ble/conftest.py b/tests/components/rapt_ble/conftest.py index 4a890eb60f1..9b62f212584 100644 --- a/tests/components/rapt_ble/conftest.py +++ b/tests/components/rapt_ble/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/ruuvi_gateway/conftest.py b/tests/components/ruuvi_gateway/conftest.py index 6a57ae00b1e..754fda0fd98 100644 --- a/tests/components/ruuvi_gateway/conftest.py +++ b/tests/components/ruuvi_gateway/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/ruuvitag_ble/test_config_flow.py b/tests/components/ruuvitag_ble/test_config_flow.py index b6c79f1de0e..3414fa34536 100644 --- a/tests/components/ruuvitag_ble/test_config_flow.py +++ b/tests/components/ruuvitag_ble/test_config_flow.py @@ -15,7 +15,7 @@ from tests.common import MockConfigEntry @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Mock bluetooth for all tests in this module.""" diff --git a/tests/components/sensirion_ble/test_config_flow.py b/tests/components/sensirion_ble/test_config_flow.py index 00e92d37118..a94f4f737e2 100644 --- a/tests/components/sensirion_ble/test_config_flow.py +++ b/tests/components/sensirion_ble/test_config_flow.py @@ -19,7 +19,7 @@ from tests.common import MockConfigEntry @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Mock bluetooth for all tests in this module.""" diff --git a/tests/components/sensorpro/conftest.py b/tests/components/sensorpro/conftest.py index 85c56845ad8..12199e03a97 100644 --- a/tests/components/sensorpro/conftest.py +++ b/tests/components/sensorpro/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/sensorpush/conftest.py b/tests/components/sensorpush/conftest.py index 2a983a7a4ed..0166f00d1e8 100644 --- a/tests/components/sensorpush/conftest.py +++ b/tests/components/sensorpush/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/shelly/conftest.py b/tests/components/shelly/conftest.py index 6f2a8cf2711..23ed1f306b1 100644 --- a/tests/components/shelly/conftest.py +++ b/tests/components/shelly/conftest.py @@ -409,5 +409,5 @@ async def mock_rpc_device(): @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/snooz/conftest.py b/tests/components/snooz/conftest.py index 8cdc2ec0982..e15c7d836c8 100644 --- a/tests/components/snooz/conftest.py +++ b/tests/components/snooz/conftest.py @@ -10,7 +10,7 @@ from . import SnoozFixture, create_mock_snooz, create_mock_snooz_config_entry @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/switchbot/conftest.py b/tests/components/switchbot/conftest.py index 3df082c4361..44f68a1c8ae 100644 --- a/tests/components/switchbot/conftest.py +++ b/tests/components/switchbot/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/thermobeacon/conftest.py b/tests/components/thermobeacon/conftest.py index ca17cdbfe4c..c4eda1318aa 100644 --- a/tests/components/thermobeacon/conftest.py +++ b/tests/components/thermobeacon/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/thermopro/conftest.py b/tests/components/thermopro/conftest.py index 1a4c59ff609..445f52b7844 100644 --- a/tests/components/thermopro/conftest.py +++ b/tests/components/thermopro/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/tilt_ble/conftest.py b/tests/components/tilt_ble/conftest.py index 552b41d10da..248e23d4c6b 100644 --- a/tests/components/tilt_ble/conftest.py +++ b/tests/components/tilt_ble/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth.""" diff --git a/tests/components/xiaomi_ble/conftest.py b/tests/components/xiaomi_ble/conftest.py index 3d68d78e27e..bd3480bc586 100644 --- a/tests/components/xiaomi_ble/conftest.py +++ b/tests/components/xiaomi_ble/conftest.py @@ -1,5 +1,6 @@ """Session fixtures.""" +from collections.abc import Generator from unittest import mock import pytest @@ -44,7 +45,7 @@ class MockBleakClientBattery5(MockBleakClient): @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> Generator[None, None, None]: """Auto mock bluetooth.""" with mock.patch("xiaomi_ble.parser.BleakClient", MockBleakClientBattery5): diff --git a/tests/components/yalexs_ble/conftest.py b/tests/components/yalexs_ble/conftest.py index c2b947cc863..27c45b9110c 100644 --- a/tests/components/yalexs_ble/conftest.py +++ b/tests/components/yalexs_ble/conftest.py @@ -4,5 +4,5 @@ import pytest @pytest.fixture(autouse=True) -def mock_bluetooth(enable_bluetooth): +def mock_bluetooth(enable_bluetooth: None) -> None: """Auto mock bluetooth."""