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

@@ -28,6 +28,8 @@ from .modules import (
)
from .smartmodule import SmartModule
if TYPE_CHECKING:
from .smartchilddevice import SmartChildDevice
_LOGGER = logging.getLogger(__name__)
@@ -196,6 +198,8 @@ class SmartDevice(Device):
# child modules have access to their sysinfo.
if update_children or self.device_type != DeviceType.Hub:
for child in self._children.values():
if TYPE_CHECKING:
assert isinstance(child, SmartChildDevice)
await child._update()
# We can first initialize the features after the first update.