Exclude __getattr__ for deprecated attributes from type checkers (#1294)

This commit is contained in:
Steven B.
2024-11-21 18:40:13 +00:00
committed by GitHub
parent 652b4e0bd7
commit cae9decb02
10 changed files with 73 additions and 50 deletions

View File

@@ -5,7 +5,7 @@ from __future__ import annotations
import logging
from collections import defaultdict
from datetime import datetime, timedelta
from typing import Any
from typing import TYPE_CHECKING, Any
from ..device_type import DeviceType
from ..deviceconfig import DeviceConfig
@@ -145,6 +145,8 @@ class IotStrip(IotDevice):
if update_children:
for plug in self.children:
if TYPE_CHECKING:
assert isinstance(plug, IotStripPlug)
await plug._update()
if not self.features: