1 from typing import Any, Pattern, Union
3 from yaml.error import MarkedYAMLError
4 from yaml.nodes import ScalarNode
6 _Scalar = Union[str, int, float, bool, None]
8 class ConstructorError(MarkedYAMLError): ...
10 class BaseConstructor:
11 yaml_constructors: Any
12 yaml_multi_constructors: Any
13 constructed_objects: Any
14 recursive_objects: Any
17 def __init__(self) -> None: ...
18 def check_data(self): ...
19 def check_state_key(self, key: str) -> None: ...
20 def get_data(self): ...
21 def get_single_data(self) -> Any: ...
22 def construct_document(self, node): ...
23 def construct_object(self, node, deep=...): ...
24 def construct_scalar(self, node: ScalarNode) -> _Scalar: ...
25 def construct_sequence(self, node, deep=...): ...
26 def construct_mapping(self, node, deep=...): ...
27 def construct_pairs(self, node, deep=...): ...
29 def add_constructor(cls, tag, constructor): ...
31 def add_multi_constructor(cls, tag_prefix, multi_constructor): ...
33 class SafeConstructor(BaseConstructor):
34 def construct_scalar(self, node: ScalarNode) -> _Scalar: ...
35 def flatten_mapping(self, node): ...
36 def construct_mapping(self, node, deep=...): ...
37 def construct_yaml_null(self, node): ...
39 def construct_yaml_bool(self, node): ...
40 def construct_yaml_int(self, node): ...
43 def construct_yaml_float(self, node): ...
44 def construct_yaml_binary(self, node): ...
46 def construct_yaml_timestamp(self, node): ...
47 def construct_yaml_omap(self, node): ...
48 def construct_yaml_pairs(self, node): ...
49 def construct_yaml_set(self, node): ...
50 def construct_yaml_str(self, node): ...
51 def construct_yaml_seq(self, node): ...
52 def construct_yaml_map(self, node): ...
53 def construct_yaml_object(self, node, cls): ...
54 def construct_undefined(self, node): ...
56 class FullConstructor(SafeConstructor):
57 def get_state_keys_blacklist(self) -> list[str]: ...
58 def get_state_keys_blacklist_regexp(self) -> Pattern[str]: ...
59 def construct_python_str(self, node): ...
60 def construct_python_unicode(self, node): ...
61 def construct_python_bytes(self, node): ...
62 def construct_python_long(self, node): ...
63 def construct_python_complex(self, node): ...
64 def construct_python_tuple(self, node): ...
65 def find_python_module(self, name, mark, unsafe=...): ...
66 def find_python_name(self, name, mark, unsafe=...): ...
67 def construct_python_name(self, suffix, node): ...
68 def construct_python_module(self, suffix, node): ...
69 def make_python_instance(self, suffix, node, args=..., kwds=..., newobj=..., unsafe=...): ...
70 def set_python_instance_state(self, instance, state, unsafe: bool = ...) -> None: ...
71 def construct_python_object(self, suffix, node): ...
72 def construct_python_object_apply(self, suffix, node, newobj=...): ...
73 def construct_python_object_new(self, suffix, node): ...
75 class UnsafeConstructor(FullConstructor):
76 def find_python_module(self, name, mark): ...
77 def find_python_name(self, name, mark): ...
78 def make_python_instance(self, suffix, node, args=..., kwds=..., newobj=...): ...
79 def set_python_instance_state(self, instance, state): ...
81 class Constructor(SafeConstructor):
82 def construct_python_str(self, node): ...
83 def construct_python_unicode(self, node): ...
84 def construct_python_long(self, node): ...
85 def construct_python_complex(self, node): ...
86 def construct_python_tuple(self, node): ...
87 def find_python_module(self, name, mark): ...
88 def find_python_name(self, name, mark): ...
89 def construct_python_name(self, suffix, node): ...
90 def construct_python_module(self, suffix, node): ...
91 def make_python_instance(self, suffix, node, args=..., kwds=..., newobj=...): ...
92 def set_python_instance_state(self, instance, state): ...
93 def construct_python_object(self, suffix, node): ...
94 def construct_python_object_apply(self, suffix, node, newobj=...): ...
95 def construct_python_object_new(self, suffix, node): ...