Skip to content

Commit 9020ba1

Browse files
committed
format fix
1 parent 70ffd64 commit 9020ba1

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

cwltool/checker.py

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,10 @@ def check_all_types(
387387
)
388388
)
389389
if is_all_output_method_loop_step(param_to_step, parm_id):
390-
src_dict[parm_id]['type'] = {'type': 'array', 'items': src_dict[parm_id]['type']}
390+
src_dict[parm_id]["type"] = {
391+
"type": "array",
392+
"items": src_dict[parm_id]["type"],
393+
}
391394
else:
392395
parm_id = cast(str, sink[sourceField])
393396
if parm_id not in src_dict:
@@ -430,7 +433,10 @@ def check_all_types(
430433
srcs_of_sink[0]["type"] = src_typ
431434

432435
if is_all_output_method_loop_step(param_to_step, parm_id):
433-
src_dict[parm_id]['type'] = {'type': 'array', 'items': src_dict[parm_id]['type']}
436+
src_dict[parm_id]["type"] = {
437+
"type": "array",
438+
"items": src_dict[parm_id]["type"],
439+
}
434440

435441
for src in srcs_of_sink:
436442
check_result = check_types(src, sink, linkMerge, valueFrom)
@@ -521,14 +527,19 @@ def is_conditional_step(param_to_step: Dict[str, CWLObjectType], parm_id: str) -
521527
return False
522528

523529

524-
def is_all_output_method_loop_step(param_to_step: Dict[str, CWLObjectType], parm_id: str) -> bool:
530+
def is_all_output_method_loop_step(
531+
param_to_step: Dict[str, CWLObjectType], parm_id: str
532+
) -> bool:
525533
source_step = param_to_step.get(parm_id)
526534
if source_step is not None:
527535
requirements = {
528-
**{h['class']: h for h in source_step.get('hints', [])},
529-
**{r['class']: r for r in source_step.get('requirements', [])}}
530-
if 'http://commonwl.org/cwltool#Loop' in requirements:
531-
output_method = requirements['http://commonwl.org/cwltool#Loop'].get('outputMethod', 'last')
532-
if output_method == 'all':
536+
**{h["class"]: h for h in source_step.get("hints", [])},
537+
**{r["class"]: r for r in source_step.get("requirements", [])},
538+
}
539+
if "http://commonwl.org/cwltool#Loop" in requirements:
540+
output_method = requirements["http://commonwl.org/cwltool#Loop"].get(
541+
"outputMethod", "last"
542+
)
543+
if output_method == "all":
533544
return True
534545
return False

0 commit comments

Comments
 (0)