Make iotmodule's _add_feature private, too

This commit is contained in:
Teemu Rytilahti 2024-02-14 20:40:25 +01:00
parent 69108cea7d
commit 20ec2f5c90
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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: