mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-12 10:28:01 +00:00
Exclude __getattr__ for deprecated attributes from type checkers (#1294)
This commit is contained in:
@@ -3,13 +3,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from typing import Any
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from ..exceptions import KasaException
|
||||
from ..module import Module
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .iotdevice import IotDevice
|
||||
|
||||
|
||||
def _merge_dict(dest: dict, source: dict) -> dict:
|
||||
"""Update dict recursively."""
|
||||
@@ -27,6 +30,8 @@ merge = _merge_dict
|
||||
class IotModule(Module):
|
||||
"""Base class implemention for all IOT modules."""
|
||||
|
||||
_device: IotDevice
|
||||
|
||||
async def call(self, method: str, params: dict | None = None) -> dict:
|
||||
"""Call the given method with the given parameters."""
|
||||
return await self._device._query_helper(self._module, method, params)
|
||||
|
Reference in New Issue
Block a user