Coverage for pysource_codegen/types.py: 100%
18 statements
« prev ^ index » next coverage.py v7.5.3, created at 2024-06-13 21:17 +0200
« prev ^ index » next coverage.py v7.5.3, created at 2024-06-13 21:17 +0200
1import ast
2from dataclasses import dataclass
3from typing import Dict
4from typing import List
5from typing import Tuple
6from typing import Type
7from typing import Union
9from typing_extensions import Literal # noqa
12@dataclass
13class NodeType:
14 fields: Dict[str, Tuple[str, Union[Literal["?"], Literal["*"], Literal[""]]]]
15 ast_type: Type[ast.AST]
18@dataclass
19class BuiltinNodeType:
20 kind: Union[
21 Literal["identifier"], Literal["int"], Literal["string"], Literal["constant"]
22 ]
25@dataclass
26class UnionNodeType:
27 options: List[str]