~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/hooks.py

remove all trailing whitespace from bzr source

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
class Hooks(dict):
29
29
    """A dictionary mapping hook name to a list of callables.
30
 
    
 
30
 
31
31
    e.g. ['FOO'] Is the list of items to be called when the
32
32
    FOO hook is triggered.
33
33
    """
41
41
 
42
42
        If no name has been registered, the string 'No hook name' is returned.
43
43
        We use a fixed string rather than repr or the callables module because
44
 
        the code names are rarely meaningful for end users and this is not 
 
44
        the code names are rarely meaningful for end users and this is not
45
45
        intended for debugging.
46
46
        """
47
47
        return self._callable_names.get(a_callable, "No hook name")
53
53
        :param hook_name: A hook name. See the __init__ method of BranchHooks
54
54
            for the complete list of hooks.
55
55
        :param a_callable: The callable to be invoked when the hook triggers.
56
 
            The exact signature will depend on the hook - see the __init__ 
 
56
            The exact signature will depend on the hook - see the __init__
57
57
            method of BranchHooks for details on each hook.
58
58
        """
59
59
        self.install_named_hook(hook_name, a_callable, None)
64
64
        :param hook_name: A hook name. See the __init__ method of BranchHooks
65
65
            for the complete list of hooks.
66
66
        :param a_callable: The callable to be invoked when the hook triggers.
67
 
            The exact signature will depend on the hook - see the __init__ 
 
67
            The exact signature will depend on the hook - see the __init__
68
68
            method of BranchHooks for details on each hook.
69
69
        :param name: A name to associate a_callable with, to show users what is
70
70
            running.