events: clarify docstrings about add_handler/remove_handler
https://github.com/QubesOS/qubes-core-admin/pull/100#discussion_r115745098
This commit is contained in:
parent
cddc507788
commit
bd1f84fcec
@ -108,6 +108,8 @@ class Emitter(object, metaclass=EmitterMeta):
|
||||
def add_handler(cls, event, func):
|
||||
'''Add event handler to subject's class.
|
||||
|
||||
This is class method, it is invalid to call it on object instance.
|
||||
|
||||
:param str event: event identificator
|
||||
:param collections.Callable handler: handler callable
|
||||
'''
|
||||
@ -119,6 +121,11 @@ class Emitter(object, metaclass=EmitterMeta):
|
||||
def remove_handler(cls, event, func):
|
||||
'''Remove event handler from subject's class.
|
||||
|
||||
This is class method, it is invalid to call it on object instance.
|
||||
|
||||
This method must be called on the same class as
|
||||
:py:meth:`add_handler` was called to register the handler.
|
||||
|
||||
:param str event: event identificator
|
||||
:param collections.Callable handler: handler callable
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user