Skip to content

Commit 4661fc0

Browse files
Add CWL objects to parser __init__.py
This commit adds some objects to the `__init__.py` file of the `parser` module to allow for version-independent reference in Python typing.
1 parent 282a7c0 commit 4661fc0

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

cwl_utils/parser/__init__.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,40 @@
2121
cwl_v1_0.InputParameter, cwl_v1_1.InputParameter, cwl_v1_2.InputParameter
2222
]
2323
"""Type union for a CWL v1.x InputParameter object."""
24+
InputRecordField = Union[
25+
cwl_v1_0.InputRecordField,
26+
cwl_v1_1.InputRecordField,
27+
cwl_v1_2.InputRecordField,
28+
]
29+
"""Type union for a CWL v1.x InputRecordField object."""
2430
OutputParameter = Union[
2531
cwl_v1_0.OutputParameter, cwl_v1_1.OutputParameter, cwl_v1_2.OutputParameter
2632
]
2733
"""Type union for a CWL v1.x OutputParameter object."""
34+
OutputArraySchema = Union[
35+
cwl_v1_0.OutputArraySchema,
36+
cwl_v1_1.OutputArraySchema,
37+
cwl_v1_2.OutputArraySchema,
38+
]
39+
"""Type union for a CWL v1.x OutputArraySchema object."""
40+
OutputEnumSchema = Union[
41+
cwl_v1_0.OutputEnumSchema,
42+
cwl_v1_1.OutputEnumSchema,
43+
cwl_v1_2.OutputEnumSchema,
44+
]
45+
"""Type union for a CWL v1.x OutputEnumSchema object."""
46+
OutputRecordField = Union[
47+
cwl_v1_0.OutputRecordField,
48+
cwl_v1_1.OutputRecordField,
49+
cwl_v1_2.OutputRecordField,
50+
]
51+
"""Type union for a CWL v1.x OutputRecordField object."""
52+
OutputRecordSchema = Union[
53+
cwl_v1_0.OutputRecordSchema,
54+
cwl_v1_1.OutputRecordSchema,
55+
cwl_v1_2.OutputRecordSchema,
56+
]
57+
"""Type union for a CWL v1.x OutputRecordSchema object."""
2858
Workflow = Union[cwl_v1_0.Workflow, cwl_v1_1.Workflow, cwl_v1_2.Workflow]
2959
WorkflowTypes = (cwl_v1_0.Workflow, cwl_v1_1.Workflow, cwl_v1_2.Workflow)
3060
"""Type union for a CWL v1.x Workflow object."""
@@ -64,6 +94,18 @@
6494
cwl_v1_2.CommandLineBinding,
6595
]
6696
"""Type union for a CWL v1.x CommandLineBinding object."""
97+
CommandOutputBinding = Union[
98+
cwl_v1_0.CommandOutputBinding,
99+
cwl_v1_1.CommandOutputBinding,
100+
cwl_v1_2.CommandOutputBinding,
101+
]
102+
"""Type union for a CWL v1.x CommandOutputBinding object."""
103+
CommandInputParameter = Union[
104+
cwl_v1_0.CommandInputParameter,
105+
cwl_v1_1.CommandInputParameter,
106+
cwl_v1_2.CommandInputParameter,
107+
]
108+
"""Type union for a CWL v1.x CommandInputParameter object."""
67109
CommandOutputParameter = Union[
68110
cwl_v1_0.CommandOutputParameter,
69111
cwl_v1_1.CommandOutputParameter,
@@ -74,6 +116,12 @@
74116
cwl_v1_0.ExpressionTool, cwl_v1_1.ExpressionTool, cwl_v1_2.ExpressionTool
75117
]
76118
"""Type union for a CWL v1.x ExpressionTool object."""
119+
ExpressionToolOutputParameter = Union[
120+
cwl_v1_0.ExpressionToolOutputParameter,
121+
cwl_v1_1.ExpressionToolOutputParameter,
122+
cwl_v1_2.ExpressionToolOutputParameter,
123+
]
124+
"""Type union for a CWL v1.x ExpressionToolOutputParameter object."""
77125
DockerRequirement = Union[
78126
cwl_v1_0.DockerRequirement, cwl_v1_1.DockerRequirement, cwl_v1_2.DockerRequirement
79127
]

0 commit comments

Comments
 (0)