-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Hi Rotem,
Thanks for developing Gossip. I love it!
I'm currently using it as part of a framework I'm writing, so I'm pre-defining a lot of hooks I use in different places. I always store the hook object and use it directly for registration (to have the hook name defined in only one place), but I'm hitting a wall when using arguments with these objects. I'm using strict groups.
# Works fine
myhook = gossip.define("mygroup.testhook", arg_names=["some_arg"])
@myhook.register
def some_function(some_arg):
pass
# Does not work:
myhook = gossip.define("mygroup.testhook", arg_names=["some_arg"], tags=["test"])
@myhook.register(tags=["test"])
def some_function(some_arg):
pass
I always end up with the following
TypeError: register() takes at least 2 arguments (2 given)
Do I need to wrap the register() call to get the functionality I want?
Cheers!
Tim
Metadata
Metadata
Assignees
Labels
No labels