From d13fa10ea385041c66364a2175c409e89a009844 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 22:53:48 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- custom_components/deebot/__init__.py | 1 + custom_components/deebot/binary_sensor.py | 1 + custom_components/deebot/button.py | 1 + custom_components/deebot/config_flow.py | 1 + custom_components/deebot/const.py | 1 + custom_components/deebot/controller.py | 1 + custom_components/deebot/diagnostics.py | 1 + custom_components/deebot/entity.py | 1 + custom_components/deebot/image.py | 1 + custom_components/deebot/number.py | 1 + custom_components/deebot/select.py | 1 + custom_components/deebot/sensor.py | 7 ++++--- custom_components/deebot/switch.py | 1 + custom_components/deebot/util.py | 1 + custom_components/deebot/vacuum.py | 1 + tests/conftest.py | 6 ++++-- 16 files changed, 22 insertions(+), 5 deletions(-) diff --git a/custom_components/deebot/__init__.py b/custom_components/deebot/__init__.py index bb12946..7a114f9 100644 --- a/custom_components/deebot/__init__.py +++ b/custom_components/deebot/__init__.py @@ -1,4 +1,5 @@ """Support for Deebot Vacuums.""" + import asyncio import logging from typing import Any diff --git a/custom_components/deebot/binary_sensor.py b/custom_components/deebot/binary_sensor.py index 7979f97..b7d5200 100644 --- a/custom_components/deebot/binary_sensor.py +++ b/custom_components/deebot/binary_sensor.py @@ -1,4 +1,5 @@ """Binary sensor module.""" + from collections.abc import Callable from dataclasses import dataclass from typing import Generic diff --git a/custom_components/deebot/button.py b/custom_components/deebot/button.py index c47e70c..fe24b7e 100644 --- a/custom_components/deebot/button.py +++ b/custom_components/deebot/button.py @@ -1,4 +1,5 @@ """Binary sensor module.""" + from collections.abc import Sequence from dataclasses import dataclass diff --git a/custom_components/deebot/config_flow.py b/custom_components/deebot/config_flow.py index 12981d2..841d7cf 100644 --- a/custom_components/deebot/config_flow.py +++ b/custom_components/deebot/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Deebot integration.""" + import logging import random import string diff --git a/custom_components/deebot/const.py b/custom_components/deebot/const.py index d5504cd..b574c11 100644 --- a/custom_components/deebot/const.py +++ b/custom_components/deebot/const.py @@ -1,4 +1,5 @@ """Const module.""" + from collections.abc import Mapping from deebot_client.events import ( diff --git a/custom_components/deebot/controller.py b/custom_components/deebot/controller.py index c067d1d..f869c99 100644 --- a/custom_components/deebot/controller.py +++ b/custom_components/deebot/controller.py @@ -1,4 +1,5 @@ """Controller module.""" + import logging import random import string diff --git a/custom_components/deebot/diagnostics.py b/custom_components/deebot/diagnostics.py index 53ab23b..b28b216 100644 --- a/custom_components/deebot/diagnostics.py +++ b/custom_components/deebot/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for deebot.""" + from __future__ import annotations from typing import Any diff --git a/custom_components/deebot/entity.py b/custom_components/deebot/entity.py index bbad973..3ebc7fa 100644 --- a/custom_components/deebot/entity.py +++ b/custom_components/deebot/entity.py @@ -1,4 +1,5 @@ """Deebot entity module.""" + from collections.abc import Callable, Coroutine from dataclasses import dataclass from typing import Any, Generic, TypeVar diff --git a/custom_components/deebot/image.py b/custom_components/deebot/image.py index 5ef504b..6066ecb 100644 --- a/custom_components/deebot/image.py +++ b/custom_components/deebot/image.py @@ -1,4 +1,5 @@ """Support for Deebot image entities.""" + from collections.abc import MutableMapping, Sequence from typing import Any diff --git a/custom_components/deebot/number.py b/custom_components/deebot/number.py index af6d91b..d839674 100644 --- a/custom_components/deebot/number.py +++ b/custom_components/deebot/number.py @@ -1,4 +1,5 @@ """Number module.""" + from collections.abc import Callable from dataclasses import dataclass from typing import Generic diff --git a/custom_components/deebot/select.py b/custom_components/deebot/select.py index f54f9d4..652262c 100644 --- a/custom_components/deebot/select.py +++ b/custom_components/deebot/select.py @@ -1,4 +1,5 @@ """Select module.""" + from collections.abc import Callable from dataclasses import dataclass from typing import Any, Generic diff --git a/custom_components/deebot/sensor.py b/custom_components/deebot/sensor.py index a09dd1d..3ebcd83 100644 --- a/custom_components/deebot/sensor.py +++ b/custom_components/deebot/sensor.py @@ -1,4 +1,5 @@ """Sensor module.""" + from collections.abc import Callable, MutableMapping, Sequence from dataclasses import dataclass from math import floor @@ -49,9 +50,9 @@ class DeebotSensorEntityDescription( ): """Deebot sensor entity description.""" - extra_state_attributes_fn: Callable[ - [EventT], MutableMapping[str, Any] - ] | None = None + extra_state_attributes_fn: Callable[[EventT], MutableMapping[str, Any]] | None = ( + None + ) value_fn: Callable[[EventT], StateType] diff --git a/custom_components/deebot/switch.py b/custom_components/deebot/switch.py index 73e4139..e5fdb0d 100644 --- a/custom_components/deebot/switch.py +++ b/custom_components/deebot/switch.py @@ -1,4 +1,5 @@ """Switch module.""" + from dataclasses import dataclass from typing import Any diff --git a/custom_components/deebot/util.py b/custom_components/deebot/util.py index db4533c..d54f2e9 100644 --- a/custom_components/deebot/util.py +++ b/custom_components/deebot/util.py @@ -1,4 +1,5 @@ """Util module.""" + import dataclasses from enum import Enum from typing import Any diff --git a/custom_components/deebot/vacuum.py b/custom_components/deebot/vacuum.py index bb5c7b5..03f54f5 100644 --- a/custom_components/deebot/vacuum.py +++ b/custom_components/deebot/vacuum.py @@ -1,4 +1,5 @@ """Support for Deebot Vacuums.""" + import logging from collections.abc import Mapping, Sequence from typing import Any diff --git a/tests/conftest.py b/tests/conftest.py index f7835f6..1810b98 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ """Global fixtures for integration_blueprint 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. @@ -34,8 +35,9 @@ def auto_enable_custom_integrations(enable_custom_integrations): @pytest.fixture(name="skip_notifications", autouse=True) def skip_notifications_fixture(): """Skip notification calls.""" - with patch("homeassistant.components.persistent_notification.async_create"), patch( - "homeassistant.components.persistent_notification.async_dismiss" + with ( + patch("homeassistant.components.persistent_notification.async_create"), + patch("homeassistant.components.persistent_notification.async_dismiss"), ): yield