Browse Source

Fix python 3.9 compat (#64)

J. Nick Koston 1 week ago
parent
commit
32ed0ce04c

+ 1 - 0
switchbot/adv_parsers/bulb.py

@@ -1,4 +1,5 @@
 """Bulb parser."""
+from __future__ import annotations
 
 
 def process_color_bulb(data: bytes, mfr_data: bytes | None) -> dict[str, bool | int]:

+ 1 - 0
switchbot/adv_parsers/contact.py

@@ -1,4 +1,5 @@
 """Contact sensor parser."""
+from __future__ import annotations
 
 
 def process_wocontact(data: bytes, mfr_data: bytes | None) -> dict[str, bool | int]:

+ 1 - 0
switchbot/adv_parsers/meter.py

@@ -1,4 +1,5 @@
 """Meter parser."""
+from __future__ import annotations
 
 
 def process_wosensorth(data: bytes, mfr_data: bytes | None) -> dict[str, object]:

+ 1 - 0
switchbot/adv_parsers/motion.py

@@ -1,4 +1,5 @@
 """Motion sensor parser."""
+from __future__ import annotations
 
 
 def process_wopresence(data: bytes, mfr_data: bytes | None) -> dict[str, bool | int]:

+ 1 - 0
switchbot/adv_parsers/plug.py

@@ -1,4 +1,5 @@
 """Library to handle connection with Switchbot."""
+from __future__ import annotations
 
 
 def process_woplugmini(data: bytes, mfr_data: bytes | None) -> dict[str, bool | int]:

+ 1 - 0
switchbot/devices/bulb.py

@@ -0,0 +1 @@
+from __future__ import annotations

+ 1 - 0
switchbot/devices/contact.py

@@ -0,0 +1 @@
+from __future__ import annotations

+ 1 - 0
switchbot/devices/meter.py

@@ -0,0 +1 @@
+from __future__ import annotations

+ 1 - 0
switchbot/devices/motion.py

@@ -0,0 +1 @@
+from __future__ import annotations

+ 2 - 0
switchbot/devices/plug.py

@@ -1,4 +1,6 @@
 """Library to handle connection with Switchbot."""
+from __future__ import annotations
+
 from typing import Any
 
 from .device import SwitchbotDevice