mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2025-01-18 10:30:48 +00:00
renaem action_prop to action_fn
This commit is contained in:
parent
a730edc2c2
commit
3c85903554
@ -1,5 +1,5 @@
|
||||
from .iremote import IRemote
|
||||
from .meta import action_prop
|
||||
from .meta import action_fn
|
||||
|
||||
|
||||
class Command(IRemote):
|
||||
@ -21,10 +21,9 @@ class Command(IRemote):
|
||||
(cls,),
|
||||
{
|
||||
**{
|
||||
param: action_prop(param)
|
||||
for param in ["show", "shutdown", "restart"]
|
||||
param: action_fn(param) for param in ["show", "shutdown", "restart"]
|
||||
},
|
||||
"hide": action_prop("show", val=0),
|
||||
"hide": action_fn("show", val=0),
|
||||
},
|
||||
)
|
||||
return CMD_cls(remote)
|
||||
|
@ -16,7 +16,7 @@ def channel_bool_prop(param):
|
||||
)[self.index],
|
||||
"little",
|
||||
)
|
||||
& getattr(self._modes, f'_{param.replace(".", "_").lower()}')
|
||||
& getattr(self._modes, f"_{param.lower()}")
|
||||
== 0
|
||||
)
|
||||
|
||||
@ -91,8 +91,8 @@ def bus_mode_prop(param):
|
||||
return property(fget, fset)
|
||||
|
||||
|
||||
def action_prop(param, val=1):
|
||||
"""A param that performs an action"""
|
||||
def action_fn(param, val=1):
|
||||
"""A function that performs an action"""
|
||||
|
||||
def fdo(self):
|
||||
self.setter(param, val)
|
||||
|
Loading…
Reference in New Issue
Block a user