From 542554e5d4449f4f677e2d18c660f65bc99ce8d0 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 19 Nov 2023 10:00:55 -0600 Subject: [PATCH] typing --- kasa/device_factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kasa/device_factory.py b/kasa/device_factory.py index f18591e8..b2de926b 100755 --- a/kasa/device_factory.py +++ b/kasa/device_factory.py @@ -74,7 +74,7 @@ def get_device_class_from_info(info: Dict[str, Any]) -> Type[SmartDevice]: raise SmartDeviceException("No 'system' or 'get_sysinfo' in response") sysinfo: Dict[str, Any] = info["system"]["get_sysinfo"] - type_ = sysinfo.get("type", sysinfo.get("mic_type")) + type_: Optional[str] = sysinfo.get("type", sysinfo.get("mic_type")) if type_ is None: raise SmartDeviceException("Unable to find the device type field!")