forked from platypush/platypush
More LINTing
Better prototype for `MultiLevelSwitchEntityManager.set_value`
This commit is contained in:
parent
fde834c1b1
commit
419a0cec61
4 changed files with 8 additions and 6 deletions
|
@ -35,7 +35,7 @@ class MultiLevelSwitchEntityManager(EntityManager, ABC):
|
|||
|
||||
@abstractmethod
|
||||
def set_value( # pylint: disable=redefined-builtin
|
||||
self, *entities, property=None, data=None, **__
|
||||
self, *_, property=None, data=None, **__
|
||||
):
|
||||
"""Set a value"""
|
||||
raise NotImplementedError()
|
||||
|
|
|
@ -859,8 +859,9 @@ class SmartthingsPlugin(
|
|||
return self.status(device)
|
||||
|
||||
@action
|
||||
def set_value( # pylint: disable=arguments-differ,redefined-builtin
|
||||
self, device: str, property: Optional[str] = None, data=None, **kwargs
|
||||
# pylint: disable=redefined-builtin,arguments-differ
|
||||
def set_value(
|
||||
self, device: str, *_, property: Optional[str] = None, data=None, **kwargs
|
||||
):
|
||||
"""
|
||||
Set the value of a device. It is compatible with the generic
|
||||
|
|
|
@ -1105,7 +1105,7 @@ class SwitchbotPlugin(
|
|||
|
||||
@action
|
||||
# pylint: disable=redefined-builtin,arguments-differ
|
||||
def set_value(self, device: str, property=None, data=None, **__):
|
||||
def set_value(self, device: str, *_, property=None, data=None, **__):
|
||||
entity = self._to_entity(device, property)
|
||||
assert entity, f'No such entity: "{device}"'
|
||||
|
||||
|
|
|
@ -1072,8 +1072,9 @@ class ZigbeeMqttPlugin(
|
|||
return properties
|
||||
|
||||
@action
|
||||
def set_value( # pylint: disable=redefined-builtin,arguments-differ
|
||||
self, device: str, property: Optional[str] = None, data=None, **kwargs
|
||||
# pylint: disable=redefined-builtin,arguments-differ
|
||||
def set_value(
|
||||
self, device: str, *_, property: Optional[str] = None, data=None, **kwargs
|
||||
):
|
||||
"""
|
||||
Entity-compatible way of setting a value on a node.
|
||||
|
|
Loading…
Reference in a new issue