Skip to content

Commit 32ed0ce

Browse files
authored
Fix python 3.9 compat (#64)
1 parent eb4a10b commit 32ed0ce

File tree

10 files changed

+11
-0
lines changed

10 files changed

+11
-0
lines changed

switchbot/adv_parsers/bulb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Bulb parser."""
2+
from __future__ import annotations
23

34

45
def process_color_bulb(data: bytes, mfr_data: bytes | None) -> dict[str, bool | int]:

switchbot/adv_parsers/contact.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Contact sensor parser."""
2+
from __future__ import annotations
23

34

45
def process_wocontact(data: bytes, mfr_data: bytes | None) -> dict[str, bool | int]:

switchbot/adv_parsers/meter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Meter parser."""
2+
from __future__ import annotations
23

34

45
def process_wosensorth(data: bytes, mfr_data: bytes | None) -> dict[str, object]:

switchbot/adv_parsers/motion.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Motion sensor parser."""
2+
from __future__ import annotations
23

34

45
def process_wopresence(data: bytes, mfr_data: bytes | None) -> dict[str, bool | int]:

switchbot/adv_parsers/plug.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Library to handle connection with Switchbot."""
2+
from __future__ import annotations
23

34

45
def process_woplugmini(data: bytes, mfr_data: bytes | None) -> dict[str, bool | int]:

switchbot/devices/bulb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from __future__ import annotations

switchbot/devices/contact.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from __future__ import annotations

switchbot/devices/meter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from __future__ import annotations

switchbot/devices/motion.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from __future__ import annotations

switchbot/devices/plug.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Library to handle connection with Switchbot."""
2+
from __future__ import annotations
3+
24
from typing import Any
35

46
from .device import SwitchbotDevice

0 commit comments

Comments
 (0)