From 4a0bad75d992ccfc9551d5719b7b970d79b26115 Mon Sep 17 00:00:00 2001 From: Sander Date: Fri, 9 Feb 2024 15:14:18 +0000 Subject: [PATCH] Fix `black` formatting --- custom_components/kamstrup_403/__init__.py | 1 + custom_components/kamstrup_403/config_flow.py | 1 + custom_components/kamstrup_403/coordinator.py | 1 + custom_components/kamstrup_403/sensor.py | 1 + tests/__init__.py | 1 + tests/conftest.py | 1 + tests/const.py | 1 + tests/test_config_flow.py | 1 + tests/test_coordinator.py | 1 + tests/test_init.py | 1 + tests/test_manifest.py | 1 + tests/test_sensor.py | 1 + 12 files changed, 12 insertions(+) diff --git a/custom_components/kamstrup_403/__init__.py b/custom_components/kamstrup_403/__init__.py index 9f84e4c..ca31ca6 100644 --- a/custom_components/kamstrup_403/__init__.py +++ b/custom_components/kamstrup_403/__init__.py @@ -4,6 +4,7 @@ For more details about this integration, please refer to https://github.com/custom-components/kamstrup_403 """ + from datetime import timedelta import logging diff --git a/custom_components/kamstrup_403/config_flow.py b/custom_components/kamstrup_403/config_flow.py index 84b9dbe..f64416f 100644 --- a/custom_components/kamstrup_403/config_flow.py +++ b/custom_components/kamstrup_403/config_flow.py @@ -1,4 +1,5 @@ """Adds config flow for Kamstrup 403.""" + import logging from homeassistant import config_entries diff --git a/custom_components/kamstrup_403/coordinator.py b/custom_components/kamstrup_403/coordinator.py index a27e93f..2ec601a 100644 --- a/custom_components/kamstrup_403/coordinator.py +++ b/custom_components/kamstrup_403/coordinator.py @@ -1,4 +1,5 @@ """DataUpdateCoordinator for kamstrup_403.""" + import logging from typing import Any, List diff --git a/custom_components/kamstrup_403/sensor.py b/custom_components/kamstrup_403/sensor.py index 19d4a40..e610e6f 100644 --- a/custom_components/kamstrup_403/sensor.py +++ b/custom_components/kamstrup_403/sensor.py @@ -1,4 +1,5 @@ """Sensor platform for kamstrup_403.""" + from datetime import datetime from homeassistant.components.sensor import ( diff --git a/tests/__init__.py b/tests/__init__.py index 975e273..22f3899 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,4 +1,5 @@ """Tests for kamstrup_403 integration.""" + from homeassistant.core import HomeAssistant from homeassistant.setup import async_setup_component from pytest_homeassistant_custom_component.common import MockConfigEntry diff --git a/tests/conftest.py b/tests/conftest.py index 0bfb4a8..e58f409 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ """Global fixtures for kamstrup_403 integration.""" + # Fixtures allow you to replace functions with a Mock object. You can perform # many options via the Mock to reflect a particular behavior from the original # function that you want to see without going through the function's actual logic. diff --git a/tests/const.py b/tests/const.py index 708a27c..32cf952 100644 --- a/tests/const.py +++ b/tests/const.py @@ -1,4 +1,5 @@ """Constants for kamstrup_403 tests.""" + from homeassistant.const import CONF_PORT, CONF_SCAN_INTERVAL, CONF_TIMEOUT # Mock config data to be used across multiple tests diff --git a/tests/test_config_flow.py b/tests/test_config_flow.py index 601f42d..73c1b5a 100644 --- a/tests/test_config_flow.py +++ b/tests/test_config_flow.py @@ -1,4 +1,5 @@ """Test kamstrup_403 config flow.""" + from unittest.mock import patch from homeassistant import config_entries, data_entry_flow diff --git a/tests/test_coordinator.py b/tests/test_coordinator.py index 6cdddd4..106eb26 100644 --- a/tests/test_coordinator.py +++ b/tests/test_coordinator.py @@ -1,4 +1,5 @@ """Tests for kamstrup_403 coordinator.""" + from homeassistant.core import HomeAssistant from custom_components.kamstrup_403.const import DOMAIN diff --git a/tests/test_init.py b/tests/test_init.py index 6eac19c..ed7ff05 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -1,4 +1,5 @@ """Test kamstrup_403 setup process.""" + from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady import pytest diff --git a/tests/test_manifest.py b/tests/test_manifest.py index 1cfb087..06e7833 100644 --- a/tests/test_manifest.py +++ b/tests/test_manifest.py @@ -1,4 +1,5 @@ """Test for versions.""" + import json from custom_components.kamstrup_403.const import DOMAIN, NAME, VERSION diff --git a/tests/test_sensor.py b/tests/test_sensor.py index beac716..13d1caf 100644 --- a/tests/test_sensor.py +++ b/tests/test_sensor.py @@ -1,4 +1,5 @@ """Tests sensor.""" + import datetime from homeassistant.components.sensor import SensorEntityDescription