From 7f023125529cd33f866a787f0b88ed7b76be265b Mon Sep 17 00:00:00 2001 From: PascalEgn Date: Tue, 17 Sep 2024 13:15:14 +0200 Subject: [PATCH] yaml: update load functions --- jsonschema2rst/parser.py | 2 +- jsonschema2rst/tree_node.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jsonschema2rst/parser.py b/jsonschema2rst/parser.py index e930988..3aa13fe 100644 --- a/jsonschema2rst/parser.py +++ b/jsonschema2rst/parser.py @@ -70,7 +70,7 @@ def schema2rst(schema_file, excluded_key): change_extension(schema_file.name, JSON_EXTENSION))) rst = RST_DIRECTIVES - TreeNode.dict2tree(yaml.load(schema_file), tree, excluded_key) + TreeNode.dict2tree(yaml.full_load(schema_file), tree, excluded_key) rst += _traverse_bfs(tree, _node2rst) return rst diff --git a/jsonschema2rst/tree_node.py b/jsonschema2rst/tree_node.py index 6e33a62..c0ff6fc 100644 --- a/jsonschema2rst/tree_node.py +++ b/jsonschema2rst/tree_node.py @@ -356,7 +356,7 @@ def improve_parent(obj, node): temp.write(response.read()) with open(filename) as temp: - schema = yaml.load(temp) + schema = yaml.full_load(temp) tree = TreeNode("Test_Hep_Schema") TreeNode.dict2tree(schema, tree) print(tree)