fixes for type checker

This commit is contained in:
Kevin Hester committed 2024-06-29 15:18:22 -07:00
1 parent bd767af485
commit 9004f1ed57
1 file changed
+2 -2
+2 -2
View File
@@ -8,7 +8,7 @@ import time
from threading import Thread
from typing import Optional
import print_color
import print_color # type: ignore[import-untyped]
from bleak import BleakClient, BleakScanner, BLEDevice
from bleak.exc import BleakDBusError, BleakError
@@ -139,7 +139,7 @@ class BLEInterface(MeshInterface):
"Standardize BLE address by removing extraneous characters and lowercasing."
return address.replace("-", "").replace("_", "").replace(":", "").lower()
def connect(self, address: Optional[str] = None):
def connect(self, address: Optional[str] = None) -> "BLEClient":
"Connect to a device by address."
# Bleak docs recommend always doing a scan before connecting (even if we know addr)