Skip to content

Commit 546f2c9

Browse files
committed
touched up names in workflow construction
1 parent 322f175 commit 546f2c9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pydra/engine/workflow.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,20 @@ def construct(
9595
non_lazy_keys = frozenset(non_lazy_vals)
9696
hash_cache = Cache() # share the hash cache to avoid recalculations
9797
non_lazy_hash = hash_function(non_lazy_vals, cache=hash_cache)
98-
defn_hash = hash_function(type(task), cache=hash_cache)
98+
task_hash = hash_function(type(task), cache=hash_cache)
9999
# Check for same non-lazy inputs
100100
try:
101-
defn_cache = cls._constructed_cache[defn_hash]
101+
cached_tasks = cls._constructed_cache[task_hash]
102102
except KeyError:
103103
pass
104104
else:
105105
if (
106-
non_lazy_keys in defn_cache
107-
and non_lazy_hash in defn_cache[non_lazy_keys]
106+
non_lazy_keys in cached_tasks
107+
and non_lazy_hash in cached_tasks[non_lazy_keys]
108108
):
109-
return defn_cache[non_lazy_keys][non_lazy_hash]
109+
return cached_tasks[non_lazy_keys][non_lazy_hash]
110110
# Check for supersets of lazy inputs
111-
for key_set, key_set_cache in defn_cache.items():
111+
for key_set, key_set_cache in cached_tasks.items():
112112
if key_set.issubset(non_lazy_keys):
113113
subset_vals = {
114114
k: v for k, v in non_lazy_vals.items() if k in key_set
@@ -193,7 +193,7 @@ def construct(
193193
f"constructor of {workflow!r}"
194194
)
195195
if not dont_cache:
196-
cls._constructed_cache[defn_hash][non_lazy_keys][non_lazy_hash] = workflow
196+
cls._constructed_cache[task_hash][non_lazy_keys][non_lazy_hash] = workflow
197197

198198
return workflow
199199

0 commit comments

Comments
 (0)