|
1 | | -from typing import Any |
| 1 | +from typing import Any, Dict, Optional, Union |
2 | 2 |
|
3 | 3 | from yaml.error import MarkedYAMLError |
| 4 | +from yaml.nodes import MappingNode, Node, ScalarNode, SequenceNode |
4 | 5 |
|
5 | 6 | class ComposerError(MarkedYAMLError): ... |
6 | 7 |
|
7 | 8 | class Composer: |
8 | | - anchors: Any |
| 9 | + anchors: Dict[Any, Node] |
9 | 10 | def __init__(self) -> None: ... |
10 | | - def check_node(self): ... |
11 | | - def get_node(self): ... |
12 | | - def get_single_node(self): ... |
13 | | - def compose_document(self): ... |
14 | | - def compose_node(self, parent, index): ... |
15 | | - def compose_scalar_node(self, anchor): ... |
16 | | - def compose_sequence_node(self, anchor): ... |
17 | | - def compose_mapping_node(self, anchor): ... |
| 11 | + def check_node(self) -> bool: ... |
| 12 | + def get_node(self) -> Optional[Node]: ... |
| 13 | + def get_single_node(self) -> Optional[Node]: ... |
| 14 | + def compose_document(self) -> Optional[Node]: ... |
| 15 | + def compose_node(self, parent: Optional[Node], index: int) -> Optional[Node]: ... |
| 16 | + def compose_scalar_node(self, anchor: Dict[Any, Node]) -> ScalarNode: ... |
| 17 | + def compose_sequence_node(self, anchor: Dict[Any, Node]) -> SequenceNode: ... |
| 18 | + def compose_mapping_node(self, anchor: Dict[Any, Node]) -> MappingNode: ... |
0 commit comments