talonvoice / beta

Issue tracker for the private Talon Beta
10 stars 0 forks source link

core actions are not discoverable #112

Closed dwiel closed 4 years ago

dwiel commented 4 years ago
>>> actions.core
actions.core
>>> dir(actions.core)
['_ActionPath__doc', '__call__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattr__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__signature__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_actions', '_chain', '_path']
>>> actions.core.repeat_command
actions.core.repeat_command

I'd like to know what else is in actions.core, but I am not sure how to figure that out.

dwiel commented 4 years ago

actions.list() seems to do the trick, but a more pythonic solution would be nice for improved discoverability

dwiel commented 4 years ago

actions.core.list() would also be nice to look at just those, rather than looking at the entire list and scrolling around the whole thing

lunixbochs commented 4 years ago

dir() can’t work because actions aren’t actually a property on the actions object

actions.core.list and such won’t work because that prevents me from making an action named “core.list()”

dwiel commented 4 years ago

Thanks