From cacbc61591cc391dc64132ca1278bae0c4778838 Mon Sep 17 00:00:00 2001 From: patman15 <14628713+patman15@users.noreply.github.com> Date: Sat, 21 Dec 2024 16:07:02 +0100 Subject: [PATCH] python 3.12 requirement --- custom_components/bms_ble/plugins/ej_bms.py | 3 ++- custom_components/bms_ble/plugins/redodo_bms.py | 3 ++- custom_components/bms_ble/plugins/seplos_v2_bms.py | 3 ++- custom_components/bms_ble/plugins/tdt_bms.py | 3 ++- pyproject.toml | 1 + 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/custom_components/bms_ble/plugins/ej_bms.py b/custom_components/bms_ble/plugins/ej_bms.py index 87e6ee6..c4a1755 100644 --- a/custom_components/bms_ble/plugins/ej_bms.py +++ b/custom_components/bms_ble/plugins/ej_bms.py @@ -1,7 +1,8 @@ """Module to support Dummy BMS.""" +from collections.abc import Callable from enum import IntEnum -from typing import Any, Callable, Final +from typing import Any, Final from bleak.backends.device import BLEDevice diff --git a/custom_components/bms_ble/plugins/redodo_bms.py b/custom_components/bms_ble/plugins/redodo_bms.py index 98e7ff4..362e180 100644 --- a/custom_components/bms_ble/plugins/redodo_bms.py +++ b/custom_components/bms_ble/plugins/redodo_bms.py @@ -1,6 +1,7 @@ """Module to support Dummy BMS.""" -from typing import Any, Callable, Final +from collections.abc import Callable +from typing import Any, Final from bleak.backends.device import BLEDevice from bleak.uuids import normalize_uuid_str diff --git a/custom_components/bms_ble/plugins/seplos_v2_bms.py b/custom_components/bms_ble/plugins/seplos_v2_bms.py index 806242d..2d8604a 100644 --- a/custom_components/bms_ble/plugins/seplos_v2_bms.py +++ b/custom_components/bms_ble/plugins/seplos_v2_bms.py @@ -1,6 +1,7 @@ """Module to support Seplos V2 BMS.""" -from typing import Any, Callable, Final +from collections.abc import Callable +from typing import Any, Final from bleak.backends.device import BLEDevice from bleak.uuids import normalize_uuid_str diff --git a/custom_components/bms_ble/plugins/tdt_bms.py b/custom_components/bms_ble/plugins/tdt_bms.py index eb19b69..a1bcfa5 100644 --- a/custom_components/bms_ble/plugins/tdt_bms.py +++ b/custom_components/bms_ble/plugins/tdt_bms.py @@ -1,6 +1,7 @@ """Module to support TDT BMS.""" -from typing import Any, Callable, Final +from collections.abc import Callable +from typing import Any, Final from bleak.backends.device import BLEDevice from bleak.exc import BleakError diff --git a/pyproject.toml b/pyproject.toml index a70a18e..bbee5e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,7 @@ classifiers = [ ] description = "Integration that allows monitoring of Bluetooth Low Energy (BLE) battery management systems (BMS) from within Home Assistant." readme = "README.md" +requires-python = ">= 3.12" [project.urls] "Source Code" = "https://github.com/patman15/BMS_BLE-HA"