Skip to content

Commit 21ea542

Browse files
Typed CWL parsers
1 parent c4e10e3 commit 21ea542

File tree

12 files changed

+7182
-6191
lines changed

12 files changed

+7182
-6191
lines changed

cwl_utils/cite_extract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def main() -> int:
3333

3434

3535
def extract_software_reqs(
36-
process: cwl.Process,
36+
process: cwl.Process | cwl.WorkflowStep,
3737
) -> Iterator[cwl.SoftwareRequirement]:
3838
"""Return an iterator over any SoftwareRequirements found in the given process."""
3939
if process.requirements:

cwl_utils/cwl_v1_0_expression_refactor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,6 +1465,7 @@ def traverse_CommandLineTool(
14651465
inp.linkMerge = None
14661466
for index, out in enumerate(new_clt_step.out):
14671467
new_clt_step.out[index] = out.split("/")[-1]
1468+
14681469
for tool_inp in new_clt_step.run.inputs:
14691470
tool_inp.id = tool_inp.id.split("#")[-1]
14701471
for tool_out in new_clt_step.run.outputs:

cwl_utils/docker_extract.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ def extract_docker_requirements(
102102
yield req
103103

104104

105-
def extract_docker_reqs(process: cwl.Process) -> Iterator[cwl.DockerRequirement]:
105+
def extract_docker_reqs(
106+
process: cwl.Process | cwl.WorkflowStep,
107+
) -> Iterator[cwl.DockerRequirement]:
106108
"""For the given process, extract the DockerRequirement(s)."""
107109
if process.requirements:
108110
for req in process.requirements:

0 commit comments

Comments
 (0)