diff --git a/homeassistant/helpers/signal.py b/homeassistant/helpers/signal.py index c7035d5a0d2..baaa36e83ce 100644 --- a/homeassistant/helpers/signal.py +++ b/homeassistant/helpers/signal.py @@ -1,4 +1,5 @@ """Signal handling related helpers.""" + import asyncio import logging import signal diff --git a/homeassistant/scripts/auth.py b/homeassistant/scripts/auth.py index dd3b9b7ba48..fff57c7adfe 100644 --- a/homeassistant/scripts/auth.py +++ b/homeassistant/scripts/auth.py @@ -1,4 +1,5 @@ """Script to manage users for the Home Assistant auth provider.""" + import argparse import asyncio import logging diff --git a/homeassistant/scripts/ensure_config.py b/homeassistant/scripts/ensure_config.py index 786b16ca923..e1ae7bc9142 100644 --- a/homeassistant/scripts/ensure_config.py +++ b/homeassistant/scripts/ensure_config.py @@ -1,4 +1,5 @@ """Script to ensure a configuration file exists.""" + import argparse import asyncio import os diff --git a/homeassistant/scripts/macos/__init__.py b/homeassistant/scripts/macos/__init__.py index 7668c73be9d..f629492ec39 100644 --- a/homeassistant/scripts/macos/__init__.py +++ b/homeassistant/scripts/macos/__init__.py @@ -1,4 +1,5 @@ """Script to install/uninstall HA into OS X.""" + import os import time diff --git a/homeassistant/util/ssl.py b/homeassistant/util/ssl.py index 6bfbec88a33..7c1e653ce75 100644 --- a/homeassistant/util/ssl.py +++ b/homeassistant/util/ssl.py @@ -1,4 +1,5 @@ """Helper to create SSL contexts.""" + import contextlib from enum import StrEnum from functools import cache diff --git a/homeassistant/util/thread.py b/homeassistant/util/thread.py index 0d600486f2f..7673d962d74 100644 --- a/homeassistant/util/thread.py +++ b/homeassistant/util/thread.py @@ -1,4 +1,5 @@ """Threading util helpers.""" + import ctypes import inspect import logging diff --git a/script/hassfest/metadata.py b/script/hassfest/metadata.py index 091c1b88e30..bd3ac4514e7 100644 --- a/script/hassfest/metadata.py +++ b/script/hassfest/metadata.py @@ -1,4 +1,5 @@ """Package metadata validation.""" + import tomllib from homeassistant.const import REQUIRED_PYTHON_VER, __version__ diff --git a/script/inspect_schemas.py b/script/inspect_schemas.py index cd72f55a855..a8ffe0afb60 100755 --- a/script/inspect_schemas.py +++ b/script/inspect_schemas.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 """Inspect all component SCHEMAS.""" + import importlib import os import pkgutil diff --git a/script/languages.py b/script/languages.py index f55fc21db93..bfc811a0905 100644 --- a/script/languages.py +++ b/script/languages.py @@ -1,4 +1,5 @@ """Helper script to update language list from the frontend source.""" + import json from pathlib import Path import sys diff --git a/script/lint_and_test.py b/script/lint_and_test.py index 48809ae4dcd..0b0562a0a84 100755 --- a/script/lint_and_test.py +++ b/script/lint_and_test.py @@ -3,6 +3,7 @@ This is NOT a full CI/linting replacement, only a quick check during development. """ + import asyncio from collections import namedtuple from contextlib import suppress diff --git a/script/scaffold/__main__.py b/script/scaffold/__main__.py index c303fc2c247..f81f9144f98 100644 --- a/script/scaffold/__main__.py +++ b/script/scaffold/__main__.py @@ -1,4 +1,5 @@ """Validate manifests.""" + import argparse from pathlib import Path import subprocess diff --git a/script/scaffold/gather_info.py b/script/scaffold/gather_info.py index 47106e7f956..cfa2669ebfe 100644 --- a/script/scaffold/gather_info.py +++ b/script/scaffold/gather_info.py @@ -1,4 +1,5 @@ """Gather info for scaffolding.""" + import json from homeassistant.util import slugify diff --git a/script/scaffold/templates/config_flow_discovery/integration/config_flow.py b/script/scaffold/templates/config_flow_discovery/integration/config_flow.py index 4e1b70a51f3..e2cfed40e1d 100644 --- a/script/scaffold/templates/config_flow_discovery/integration/config_flow.py +++ b/script/scaffold/templates/config_flow_discovery/integration/config_flow.py @@ -1,4 +1,5 @@ """Config flow for NEW_NAME.""" + import my_pypi_dependency from homeassistant.core import HomeAssistant diff --git a/script/scaffold/templates/config_flow_helper/tests/test_init.py b/script/scaffold/templates/config_flow_helper/tests/test_init.py index 0e86874c745..9f6951189ac 100644 --- a/script/scaffold/templates/config_flow_helper/tests/test_init.py +++ b/script/scaffold/templates/config_flow_helper/tests/test_init.py @@ -1,4 +1,5 @@ """Test the NEW_NAME integration.""" + import pytest from homeassistant.components.NEW_DOMAIN.const import DOMAIN diff --git a/script/scaffold/templates/config_flow_oauth2/integration/config_flow.py b/script/scaffold/templates/config_flow_oauth2/integration/config_flow.py index a035a65dbb3..d855cc2a70b 100644 --- a/script/scaffold/templates/config_flow_oauth2/integration/config_flow.py +++ b/script/scaffold/templates/config_flow_oauth2/integration/config_flow.py @@ -1,4 +1,5 @@ """Config flow for NEW_NAME.""" + import logging from homeassistant.helpers import config_entry_oauth2_flow diff --git a/script/scaffold/templates/device_action/tests/test_device_action.py b/script/scaffold/templates/device_action/tests/test_device_action.py index a6e8f99854a..cd7adfbc844 100644 --- a/script/scaffold/templates/device_action/tests/test_device_action.py +++ b/script/scaffold/templates/device_action/tests/test_device_action.py @@ -1,4 +1,5 @@ """The tests for NEW_NAME device actions.""" + import pytest from pytest_unordered import unordered diff --git a/script/scaffold/templates/device_trigger/tests/test_device_trigger.py b/script/scaffold/templates/device_trigger/tests/test_device_trigger.py index 177c095b601..54b202c978c 100644 --- a/script/scaffold/templates/device_trigger/tests/test_device_trigger.py +++ b/script/scaffold/templates/device_trigger/tests/test_device_trigger.py @@ -1,4 +1,5 @@ """The tests for NEW_NAME device triggers.""" + import pytest from pytest_unordered import unordered diff --git a/script/scaffold/templates/reproduce_state/tests/test_reproduce_state.py b/script/scaffold/templates/reproduce_state/tests/test_reproduce_state.py index cb4e37c0933..a8cb7b09c96 100644 --- a/script/scaffold/templates/reproduce_state/tests/test_reproduce_state.py +++ b/script/scaffold/templates/reproduce_state/tests/test_reproduce_state.py @@ -1,4 +1,5 @@ """Test reproduce state for NEW_NAME.""" + import pytest from homeassistant.core import HomeAssistant, State diff --git a/script/translations/__main__.py b/script/translations/__main__.py index 52a39038107..c381b621e69 100644 --- a/script/translations/__main__.py +++ b/script/translations/__main__.py @@ -1,4 +1,5 @@ """Validate manifests.""" + import argparse import importlib from pathlib import Path diff --git a/script/translations/clean.py b/script/translations/clean.py index 0f2eb40300d..0403e04f789 100644 --- a/script/translations/clean.py +++ b/script/translations/clean.py @@ -1,4 +1,5 @@ """Find translation keys that are in Lokalise but no longer defined in source.""" + import argparse from .const import CORE_PROJECT_ID, FRONTEND_DIR, FRONTEND_PROJECT_ID, INTEGRATIONS_DIR diff --git a/script/translations/const.py b/script/translations/const.py index ef8e3f2df74..9ff8aeb2d70 100644 --- a/script/translations/const.py +++ b/script/translations/const.py @@ -1,4 +1,5 @@ """Translation constants.""" + import pathlib CORE_PROJECT_ID = "130246255a974bd3b5e8a1.51616605" diff --git a/script/translations/develop.py b/script/translations/develop.py index 3e386afb641..14e3c320c3e 100644 --- a/script/translations/develop.py +++ b/script/translations/develop.py @@ -1,4 +1,5 @@ """Compile the current translation strings files for testing.""" + import argparse import json from pathlib import Path diff --git a/script/translations/error.py b/script/translations/error.py index 210af95f325..4811210ae3c 100644 --- a/script/translations/error.py +++ b/script/translations/error.py @@ -1,4 +1,5 @@ """Errors for translations.""" + import json diff --git a/script/translations/frontend.py b/script/translations/frontend.py index bb0e98e1c93..289c885fe33 100644 --- a/script/translations/frontend.py +++ b/script/translations/frontend.py @@ -1,4 +1,5 @@ """Write updated translations to the frontend.""" + import argparse import json diff --git a/script/translations/migrate.py b/script/translations/migrate.py index c3057800973..a6cffe28f7f 100644 --- a/script/translations/migrate.py +++ b/script/translations/migrate.py @@ -1,4 +1,5 @@ """Migrate things.""" + import json import pathlib from pprint import pprint diff --git a/script/translations/upload.py b/script/translations/upload.py index eaf1c07ad91..ee4a57bc00a 100755 --- a/script/translations/upload.py +++ b/script/translations/upload.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 """Merge all translation sources into a single JSON file.""" + import json import os import pathlib diff --git a/script/translations/util.py b/script/translations/util.py index aab98e049d9..8892bb46b7a 100644 --- a/script/translations/util.py +++ b/script/translations/util.py @@ -1,4 +1,5 @@ """Translation utils.""" + import argparse import json import os diff --git a/script/version_bump.py b/script/version_bump.py index 3a6c0fa7540..50f749d6983 100755 --- a/script/version_bump.py +++ b/script/version_bump.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 """Helper script to bump the current version.""" + import argparse import re import subprocess diff --git a/tests/auth/mfa_modules/test_notify.py b/tests/auth/mfa_modules/test_notify.py index d5b7e0bbc62..662da38b35b 100644 --- a/tests/auth/mfa_modules/test_notify.py +++ b/tests/auth/mfa_modules/test_notify.py @@ -1,4 +1,5 @@ """Test the HMAC-based One Time Password (MFA) auth module.""" + import asyncio from unittest.mock import patch diff --git a/tests/auth/mfa_modules/test_totp.py b/tests/auth/mfa_modules/test_totp.py index e5b1a930dd7..961db3f44ca 100644 --- a/tests/auth/mfa_modules/test_totp.py +++ b/tests/auth/mfa_modules/test_totp.py @@ -1,4 +1,5 @@ """Test the Time-based One Time Password (MFA) auth module.""" + import asyncio from unittest.mock import patch diff --git a/tests/auth/permissions/test_entities.py b/tests/auth/permissions/test_entities.py index ce539d51dde..7f5355b3cc0 100644 --- a/tests/auth/permissions/test_entities.py +++ b/tests/auth/permissions/test_entities.py @@ -1,4 +1,5 @@ """Tests for entity permissions.""" + import pytest import voluptuous as vol diff --git a/tests/auth/providers/test_homeassistant.py b/tests/auth/providers/test_homeassistant.py index 222911a61c2..22d4ba26845 100644 --- a/tests/auth/providers/test_homeassistant.py +++ b/tests/auth/providers/test_homeassistant.py @@ -1,4 +1,5 @@ """Test the Home Assistant local auth provider.""" + import asyncio from unittest.mock import Mock, patch diff --git a/tests/auth/providers/test_legacy_api_password.py b/tests/auth/providers/test_legacy_api_password.py index 75c4f733285..9f1f98aeaf0 100644 --- a/tests/auth/providers/test_legacy_api_password.py +++ b/tests/auth/providers/test_legacy_api_password.py @@ -1,4 +1,5 @@ """Tests for the legacy_api_password auth provider.""" + import pytest from homeassistant import auth, data_entry_flow diff --git a/tests/auth/test_auth_store.py b/tests/auth/test_auth_store.py index 858d4d082b1..796f2335569 100644 --- a/tests/auth/test_auth_store.py +++ b/tests/auth/test_auth_store.py @@ -1,4 +1,5 @@ """Tests for the auth store.""" + import asyncio from datetime import timedelta from typing import Any diff --git a/tests/hassfest/test_dependencies.py b/tests/hassfest/test_dependencies.py index 92a7fa27dc4..84e02b2d9d5 100644 --- a/tests/hassfest/test_dependencies.py +++ b/tests/hassfest/test_dependencies.py @@ -1,4 +1,5 @@ """Tests for hassfest dependency finder.""" + import ast import pytest @@ -59,6 +60,7 @@ def test_renamed_absolute(mock_collector) -> None: mock_collector.visit( ast.parse( """ + import homeassistant.components.renamed_absolute as hue """ ) diff --git a/tests/hassfest/test_version.py b/tests/hassfest/test_version.py index f473e988027..9cc1bbb11e5 100644 --- a/tests/hassfest/test_version.py +++ b/tests/hassfest/test_version.py @@ -1,4 +1,5 @@ """Tests for hassfest version.""" + import pytest import voluptuous as vol diff --git a/tests/helpers/test_check_config.py b/tests/helpers/test_check_config.py index a7c5fe36cff..fdb61505d5e 100644 --- a/tests/helpers/test_check_config.py +++ b/tests/helpers/test_check_config.py @@ -1,4 +1,5 @@ """Test check_config helper.""" + import logging from unittest.mock import Mock, patch diff --git a/tests/helpers/test_debounce.py b/tests/helpers/test_debounce.py index 958b88951ce..24f243086e5 100644 --- a/tests/helpers/test_debounce.py +++ b/tests/helpers/test_debounce.py @@ -1,4 +1,5 @@ """Tests for debounce.""" + import asyncio from datetime import timedelta import logging diff --git a/tests/helpers/test_entity.py b/tests/helpers/test_entity.py index e9950ec4dfc..241a26e6529 100644 --- a/tests/helpers/test_entity.py +++ b/tests/helpers/test_entity.py @@ -1,4 +1,5 @@ """Test the entity helper.""" + import asyncio from collections.abc import Iterable import dataclasses diff --git a/tests/helpers/test_entity_platform.py b/tests/helpers/test_entity_platform.py index f6fc5888c1c..4a13e6c84d1 100644 --- a/tests/helpers/test_entity_platform.py +++ b/tests/helpers/test_entity_platform.py @@ -1,4 +1,5 @@ """Tests for the EntityPlatform helper.""" + import asyncio from collections.abc import Iterable from datetime import timedelta diff --git a/tests/helpers/test_floor_registry.py b/tests/helpers/test_floor_registry.py index feb5ce505ac..c5e5b42fafa 100644 --- a/tests/helpers/test_floor_registry.py +++ b/tests/helpers/test_floor_registry.py @@ -1,4 +1,5 @@ """Tests for the floor registry.""" + import re from typing import Any diff --git a/tests/helpers/test_json.py b/tests/helpers/test_json.py index 2106a397baf..192db706974 100644 --- a/tests/helpers/test_json.py +++ b/tests/helpers/test_json.py @@ -1,4 +1,5 @@ """Test Home Assistant remote methods and classes.""" + import datetime from functools import partial import json diff --git a/tests/helpers/test_label_registry.py b/tests/helpers/test_label_registry.py index 13f3837737b..785919b25c0 100644 --- a/tests/helpers/test_label_registry.py +++ b/tests/helpers/test_label_registry.py @@ -1,4 +1,5 @@ """Tests for the Label Registry.""" + import re from typing import Any diff --git a/tests/helpers/test_normalized_name_base_registry.py b/tests/helpers/test_normalized_name_base_registry.py index 0b0e53abe83..495d147340f 100644 --- a/tests/helpers/test_normalized_name_base_registry.py +++ b/tests/helpers/test_normalized_name_base_registry.py @@ -1,4 +1,5 @@ """Tests for the normalized name base registry helper.""" + import pytest from homeassistant.helpers.normalized_name_base_registry import ( diff --git a/tests/helpers/test_ratelimit.py b/tests/helpers/test_ratelimit.py index 39e83953c45..9bd18a7e882 100644 --- a/tests/helpers/test_ratelimit.py +++ b/tests/helpers/test_ratelimit.py @@ -1,4 +1,5 @@ """Tests for ratelimit.""" + import asyncio from datetime import timedelta diff --git a/tests/helpers/test_reload.py b/tests/helpers/test_reload.py index 4425ce00ce1..4f7a2053a87 100644 --- a/tests/helpers/test_reload.py +++ b/tests/helpers/test_reload.py @@ -1,4 +1,5 @@ """Tests for the reload helper.""" + import logging from unittest.mock import AsyncMock, Mock, patch diff --git a/tests/helpers/test_script.py b/tests/helpers/test_script.py index 3dfe8fdbad9..b58b03fa9a9 100644 --- a/tests/helpers/test_script.py +++ b/tests/helpers/test_script.py @@ -1,4 +1,5 @@ """The tests for the Script component.""" + import asyncio from contextlib import contextmanager from datetime import timedelta diff --git a/tests/helpers/test_script_variables.py b/tests/helpers/test_script_variables.py index 99aae08587e..ca942acdf66 100644 --- a/tests/helpers/test_script_variables.py +++ b/tests/helpers/test_script_variables.py @@ -1,4 +1,5 @@ """Test script variables.""" + import pytest from homeassistant.core import HomeAssistant diff --git a/tests/helpers/test_service.py b/tests/helpers/test_service.py index 90f9b65aaba..b0d94bad23b 100644 --- a/tests/helpers/test_service.py +++ b/tests/helpers/test_service.py @@ -1,4 +1,5 @@ """Test service helpers.""" + import asyncio from collections.abc import Iterable from copy import deepcopy diff --git a/tests/helpers/test_significant_change.py b/tests/helpers/test_significant_change.py index 6444781aa85..8dda63bb72b 100644 --- a/tests/helpers/test_significant_change.py +++ b/tests/helpers/test_significant_change.py @@ -1,4 +1,5 @@ """Test significant change helper.""" + import pytest from homeassistant.components.sensor import SensorDeviceClass diff --git a/tests/helpers/test_start.py b/tests/helpers/test_start.py index d203b336f27..d9c6bbf441c 100644 --- a/tests/helpers/test_start.py +++ b/tests/helpers/test_start.py @@ -1,4 +1,5 @@ """Test starting HA helpers.""" + import pytest from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STARTED diff --git a/tests/helpers/test_state.py b/tests/helpers/test_state.py index 255fba0e7e7..150f31f5fe9 100644 --- a/tests/helpers/test_state.py +++ b/tests/helpers/test_state.py @@ -1,4 +1,5 @@ """Test state helpers.""" + import asyncio from unittest.mock import patch diff --git a/tests/helpers/test_storage.py b/tests/helpers/test_storage.py index 66dd8c10463..0918a9551f4 100644 --- a/tests/helpers/test_storage.py +++ b/tests/helpers/test_storage.py @@ -1,4 +1,5 @@ """Tests for the storage helper.""" + import asyncio from datetime import timedelta import json diff --git a/tests/helpers/test_system_info.py b/tests/helpers/test_system_info.py index 5c3697ad936..1b3f26ee763 100644 --- a/tests/helpers/test_system_info.py +++ b/tests/helpers/test_system_info.py @@ -1,4 +1,5 @@ """Tests for the system info helper.""" + import json import os from unittest.mock import patch diff --git a/tests/helpers/test_temperature.py b/tests/helpers/test_temperature.py index ceb4f7bdef2..a5daeac2a6a 100644 --- a/tests/helpers/test_temperature.py +++ b/tests/helpers/test_temperature.py @@ -1,4 +1,5 @@ """Tests Home Assistant temperature helpers.""" + import pytest from homeassistant.const import ( diff --git a/tests/helpers/test_translation.py b/tests/helpers/test_translation.py index 839607cc8b8..772b5d05f79 100644 --- a/tests/helpers/test_translation.py +++ b/tests/helpers/test_translation.py @@ -1,4 +1,5 @@ """Test the translation helper.""" + import asyncio from os import path import pathlib diff --git a/tests/scripts/test_auth.py b/tests/scripts/test_auth.py index 3d9f26d1204..8367eda76e8 100644 --- a/tests/scripts/test_auth.py +++ b/tests/scripts/test_auth.py @@ -1,4 +1,5 @@ """Test the auth script to manage local users.""" + import logging from typing import Any from unittest.mock import Mock, patch diff --git a/tests/scripts/test_check_config.py b/tests/scripts/test_check_config.py index 9e2f6708c99..a77e5bf504a 100644 --- a/tests/scripts/test_check_config.py +++ b/tests/scripts/test_check_config.py @@ -1,4 +1,5 @@ """Test check_config script.""" + import logging from unittest.mock import patch diff --git a/tests/test_bootstrap.py b/tests/test_bootstrap.py index 83722566590..4f3bcb74d7d 100644 --- a/tests/test_bootstrap.py +++ b/tests/test_bootstrap.py @@ -1,4 +1,5 @@ """Test the bootstrapping.""" + import asyncio from collections.abc import Generator, Iterable import glob diff --git a/tests/test_circular_imports.py b/tests/test_circular_imports.py index 1c5157b74e1..79f0fd9caf7 100644 --- a/tests/test_circular_imports.py +++ b/tests/test_circular_imports.py @@ -1,4 +1,5 @@ """Test to check for circular imports in core components.""" + import asyncio import sys diff --git a/tests/test_data_entry_flow.py b/tests/test_data_entry_flow.py index c6a5f65be92..710a637e941 100644 --- a/tests/test_data_entry_flow.py +++ b/tests/test_data_entry_flow.py @@ -1,4 +1,5 @@ """Test the flow classes.""" + import asyncio import dataclasses import logging diff --git a/tests/test_loader.py b/tests/test_loader.py index d73ae161041..7828d197fc1 100644 --- a/tests/test_loader.py +++ b/tests/test_loader.py @@ -1,4 +1,5 @@ """Test to verify that we can load components.""" + import asyncio import os import sys diff --git a/tests/test_requirements.py b/tests/test_requirements.py index 228ab2df2b4..87d055e2122 100644 --- a/tests/test_requirements.py +++ b/tests/test_requirements.py @@ -1,4 +1,5 @@ """Test requirements module.""" + import asyncio import logging import os diff --git a/tests/test_runner.py b/tests/test_runner.py index 14728321721..c49093bd4d6 100644 --- a/tests/test_runner.py +++ b/tests/test_runner.py @@ -1,4 +1,5 @@ """Test the runner.""" + import asyncio from collections.abc import Iterator import threading diff --git a/tests/test_util/aiohttp.py b/tests/test_util/aiohttp.py index 4f2518253ff..df232e51aee 100644 --- a/tests/test_util/aiohttp.py +++ b/tests/test_util/aiohttp.py @@ -1,4 +1,5 @@ """Aiohttp test utils.""" + import asyncio from contextlib import contextmanager from http import HTTPStatus diff --git a/tests/test_util/test_aiohttp.py b/tests/test_util/test_aiohttp.py index 525022685bd..7226e84b04c 100644 --- a/tests/test_util/test_aiohttp.py +++ b/tests/test_util/test_aiohttp.py @@ -1,4 +1,5 @@ """Tests for our aiohttp mocker.""" + import pytest from .aiohttp import AiohttpClientMocker diff --git a/tests/testing_config/custom_components/test/button.py b/tests/testing_config/custom_components/test/button.py index 99c6868f834..8daf3a741a1 100644 --- a/tests/testing_config/custom_components/test/button.py +++ b/tests/testing_config/custom_components/test/button.py @@ -2,6 +2,7 @@ Call init before using it in your tests to ensure clean test data. """ + import logging from homeassistant.components.button import ButtonEntity diff --git a/tests/util/test_async.py b/tests/util/test_async.py index 199e21960e4..fc0032204d7 100644 --- a/tests/util/test_async.py +++ b/tests/util/test_async.py @@ -1,4 +1,5 @@ """Tests for async util methods from Python source.""" + import asyncio import sys import time diff --git a/tests/util/test_color.py b/tests/util/test_color.py index 5dd20d8d887..53c243a1e4f 100644 --- a/tests/util/test_color.py +++ b/tests/util/test_color.py @@ -1,4 +1,5 @@ """Test Home Assistant color util methods.""" + import math import pytest diff --git a/tests/util/test_file.py b/tests/util/test_file.py index dc09ff83e9e..64c74b73dc3 100644 --- a/tests/util/test_file.py +++ b/tests/util/test_file.py @@ -1,4 +1,5 @@ """Test Home Assistant file utility functions.""" + import os from pathlib import Path from unittest.mock import patch diff --git a/tests/util/test_logging.py b/tests/util/test_logging.py index 350baa9d4c2..2473485e103 100644 --- a/tests/util/test_logging.py +++ b/tests/util/test_logging.py @@ -1,4 +1,5 @@ """Test Home Assistant logging util methods.""" + import asyncio from functools import partial import logging diff --git a/tests/util/test_package.py b/tests/util/test_package.py index 42ba0131d71..0e2e9278676 100644 --- a/tests/util/test_package.py +++ b/tests/util/test_package.py @@ -1,4 +1,5 @@ """Test Home Assistant package util methods.""" + import asyncio from importlib.metadata import metadata import logging diff --git a/tests/util/test_read_only_dict.py b/tests/util/test_read_only_dict.py index c975bf01304..888ea59fb11 100644 --- a/tests/util/test_read_only_dict.py +++ b/tests/util/test_read_only_dict.py @@ -1,4 +1,5 @@ """Test read only dictionary.""" + import json import pytest diff --git a/tests/util/test_timeout.py b/tests/util/test_timeout.py index 4f841c27f0d..99430cc0361 100644 --- a/tests/util/test_timeout.py +++ b/tests/util/test_timeout.py @@ -1,4 +1,5 @@ """Test Home Assistant timeout handler.""" + import asyncio from contextlib import suppress import time diff --git a/tests/util/yaml/test_input.py b/tests/util/yaml/test_input.py index 42582de4aff..682e4bcac03 100644 --- a/tests/util/yaml/test_input.py +++ b/tests/util/yaml/test_input.py @@ -1,4 +1,5 @@ """Test inputs.""" + import pytest from homeassistant.util.yaml import (