Skip to content

Commit 9d0be3e

Browse files
Copilotpuddly
andcommitted
Bump zigpy to 0.91.2 and migrate from enum_factory to enum40/24/64
Co-authored-by: puddly <32534428+puddly@users.noreply.github.com>
1 parent bbe36da commit 9d0be3e

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ readme = "README.md"
1414
license = {text = "GPL-3.0"}
1515
requires-python = ">=3.8"
1616
dependencies = [
17-
"zigpy>=0.78.0",
17+
"zigpy>=0.91.2",
1818
'async-timeout; python_version<"3.11"',
1919
"voluptuous",
2020
"coloredlogs",

zigpy_znp/types/basic.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import typing
44

5-
from zigpy.types import int8s, uint8_t, enum_factory # noqa: F401
5+
from zigpy.types import int8s, uint8_t # noqa: F401
66

77
from zigpy_znp.types.cstruct import CStruct
88

@@ -34,6 +34,9 @@ class bitmap16(enum.IntFlag):
3434
from zigpy.types import ( # noqa: F401
3535
enum8,
3636
enum16,
37+
enum24,
38+
enum40,
39+
enum64,
3740
bitmap8,
3841
bitmap16,
3942
uint16_t,
@@ -43,15 +46,6 @@ class bitmap16(enum.IntFlag):
4346
uint64_t,
4447
)
4548

46-
class enum24(enum_factory(uint24_t)): # type: ignore[misc]
47-
pass
48-
49-
class enum40(enum_factory(uint40_t)): # type: ignore[misc]
50-
pass
51-
52-
class enum64(enum_factory(uint64_t)): # type: ignore[misc]
53-
pass
54-
5549

5650
class Bytes(bytes):
5751
def serialize(self) -> Bytes:

0 commit comments

Comments
 (0)