mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-01-24 21:57:07 +00:00
Make iotmodule's _add_feature private, too
This commit is contained in:
parent
69108cea7d
commit
20ec2f5c90
@ -28,7 +28,7 @@ class Cloud(IotModule):
|
|||||||
|
|
||||||
def __init__(self, device, module):
|
def __init__(self, device, module):
|
||||||
super().__init__(device, module)
|
super().__init__(device, module)
|
||||||
self.add_feature(
|
self._add_feature(
|
||||||
Feature(
|
Feature(
|
||||||
device=device,
|
device=device,
|
||||||
container=self,
|
container=self,
|
||||||
|
@ -37,7 +37,7 @@ class IotModule(ABC):
|
|||||||
self._module = module
|
self._module = module
|
||||||
self._module_features: Dict[str, Feature] = {}
|
self._module_features: Dict[str, Feature] = {}
|
||||||
|
|
||||||
def add_feature(self, feature: Feature):
|
def _add_feature(self, feature: Feature):
|
||||||
"""Add module feature."""
|
"""Add module feature."""
|
||||||
feature_name = f"{self._module}_{feature.name}"
|
feature_name = f"{self._module}_{feature.name}"
|
||||||
if feature_name in self._module_features:
|
if feature_name in self._module_features:
|
||||||
|
Loading…
Reference in New Issue
Block a user