mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 10:44:04 +00:00
Exclude __getattr__ for deprecated attributes from type checkers (#1294)
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user