Coverage for skema/gromet/execution_engine/types/defined_types.py: 100%
21 statements
« prev ^ index » next coverage.py v7.5.0, created at 2024-04-30 17:15 +0000
« prev ^ index » next coverage.py v7.5.0, created at 2024-04-30 17:15 +0000
1import numpy
2from typing import Union, List, Tuple, Dict, Set, Any
3from dataclasses import dataclass
6@dataclass(frozen=True)
7class Field:
8 name: str
9 type: str
10 variatic: bool = False
11 default_val: Any = None
14@dataclass
15class RecordField:
16 name: str
17 value_type: type
18 value: Any
21@dataclass
22class Record(object):
23 name: str
24 fields: "list[RecordField]"
27Sequence = Union[range, List, numpy.ndarray, Tuple]
28Iterable = Union[Set, Sequence, Dict]
29Indexable = Union[Sequence, Dict, Record]