Skip to content

Commit 4133226

Browse files
Remove useless explicit LoadingOption param
This commit removes the useless propagation of the `LoadingOptions` object when calling the `load_step` method. This fix also improves performance when parsing large workflows.
1 parent 039be8f commit 4133226

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

cwl_utils/parser/utils.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,15 @@ def load_step(
138138
step: cwl_utils.parser.WorkflowStep,
139139
) -> Process:
140140
if isinstance(step.run, str):
141-
step_run = cwl_utils.parser.load_document_by_uri(
142-
path=step.loadingOptions.fetcher.urljoin(
143-
base_url=cast(str, step.loadingOptions.fileuri),
144-
url=step.run,
141+
return cast(
142+
Process,
143+
cwl_utils.parser.load_document_by_uri(
144+
path=step.loadingOptions.fetcher.urljoin(
145+
base_url=cast(str, step.loadingOptions.fileuri),
146+
url=step.run,
147+
),
145148
),
146-
loadingOptions=step.loadingOptions,
147149
)
148-
return cast(Process, step_run)
149150
else:
150151
return cast(Process, copy.deepcopy(step.run))
151152

0 commit comments

Comments
 (0)