More LINTing

Better prototype for `MultiLevelSwitchEntityManager.set_value`
This commit is contained in:
Fabio Manganiello 2023-02-05 23:07:43 +01:00
parent fde834c1b1
commit 419a0cec61
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774
4 changed files with 8 additions and 6 deletions

View file

@ -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()

View file

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

View file

@ -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}"'

View file

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