From d634fc2f52b1f35e3bc664c7635859debbfe5e5d Mon Sep 17 00:00:00 2001 From: "Axel H." Date: Mon, 30 Dec 2024 03:17:02 +0100 Subject: [PATCH] fix(yaml): SafeConstructor.construct_scalar accept `MappingNode` (#13340) --- stubs/PyYAML/yaml/constructor.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/PyYAML/yaml/constructor.pyi b/stubs/PyYAML/yaml/constructor.pyi index 734269078..14aeb646f 100644 --- a/stubs/PyYAML/yaml/constructor.pyi +++ b/stubs/PyYAML/yaml/constructor.pyi @@ -39,7 +39,7 @@ class BaseConstructor: def add_multi_constructor(cls, tag_prefix, multi_constructor): ... class SafeConstructor(BaseConstructor): - def construct_scalar(self, node: ScalarNode) -> str: ... + def construct_scalar(self, node: ScalarNode | MappingNode) -> str: ... def flatten_mapping(self, node: MappingNode) -> None: ... def construct_mapping(self, node: MappingNode, deep: bool = False) -> dict[Hashable, Any]: ... def construct_yaml_null(self, node: ScalarNode) -> None: ...