1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
# SPDX-License-Identifier: Apache-2.0
# From https://github.com/rabix/sbpack/blob/b8404a0859ffcbe1edae6d8f934e51847b003320/sbpack/lib.py
"""Shared Python type definitions for commons JSON like CWL objects."""
from collections.abc import MutableMapping, MutableSequence
from typing import Any, Optional, Union
built_in_types = [
"null",
"boolean",
"int",
"long",
"float",
"double",
"string",
"File",
"Directory",
"stdin",
"stdout",
"stderr",
"Any",
]
CWLOutputAtomType = Union[
None,
bool,
str,
int,
float,
MutableSequence[
Union[
None, bool, str, int, float, MutableSequence[Any], MutableMapping[str, Any]
]
],
MutableMapping[
str,
Union[
None, bool, str, int, float, MutableSequence[Any], MutableMapping[str, Any]
],
],
]
CWLOutputType = Union[
bool,
str,
int,
float,
MutableSequence[CWLOutputAtomType],
MutableMapping[str, CWLOutputAtomType],
]
CWLObjectType = MutableMapping[str, Optional[CWLOutputType]]
SinkType = Union[CWLOutputType, CWLObjectType]
|