Skip to content

Commit a5ff50a

Browse files
committed
Fix comments claiming hooks was a list
1 parent b61190d commit a5ff50a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

easybuild/framework/easyblock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def __init__(self, ec):
144144
# keep track of original working directory, so we can go back there
145145
self.orig_workdir = os.getcwd()
146146

147-
# list of pre- and post-step hooks
147+
# dict of all hooks (mapping of name to function)
148148
self.hooks = load_hooks(build_option('hooks'))
149149

150150
# list of patch/source files, along with checksums

easybuild/tools/hooks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def load_hooks(hooks_path):
120120

121121

122122
def verify_hooks(hooks):
123-
"""Check whether list of obtained hooks only includes known hooks."""
123+
"""Check whether obtained hooks only includes known hooks."""
124124
unknown_hooks = [key for key in sorted(hooks) if key not in KNOWN_HOOKS]
125125

126126
if unknown_hooks:
@@ -169,10 +169,10 @@ def find_hook(label, hooks, pre_step_hook=False, post_step_hook=False):
169169

170170
def run_hook(label, hooks, pre_step_hook=False, post_step_hook=False, args=None, msg=None):
171171
"""
172-
Run hook with specified label and return result of hook or None.
172+
Run hook with specified label and return result of calling the hook or None.
173173
174174
:param label: name of hook
175-
:param hooks: list of defined hooks
175+
:param hooks: dict of defined hooks
176176
:param pre_step_hook: indicates whether hook to run is a pre-step hook
177177
:param post_step_hook: indicates whether hook to run is a post-step hook
178178
:param args: arguments to pass to hook function

0 commit comments

Comments
 (0)