Skip to content

Commit 59ff55d

Browse files
authored
Merge pull request #2850 from Wovchena/yaml.load-yaml.safe_load
yaml.load -> yaml.safe_load
2 parents 7057cea + 884afe2 commit 59ff55d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ci/documentation_updater/documentation_updater.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def get_models_from_configs(directory):
113113
model_configs = directory.glob('**/model.yml')
114114
for model in model_configs:
115115
with model.open("r", encoding="utf-8") as file:
116-
models[model.parent.name] = (model, yaml.load(file))
116+
models[model.parent.name] = (model, yaml.safe_load(file))
117117
if not models[model.parent.name][1]:
118118
logging.error("File {} is empty. It will be ignored.".format(model))
119119
del models[model.parent.name]

tools/accuracy_checker/tests/test_config_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def test_read_configs_without_global_config(self, mocker):
117117
'aocl': None, 'deprecated_ir_v7': False, 'transformations_config_dir': None, 'model_attributes': None
118118
})
119119
mocker.patch('accuracy_checker.utils.get_path', return_value=Path.cwd())
120-
mocker.patch('yaml.load', return_value=config)
120+
mocker.patch('yaml.safe_load', return_value=config)
121121
mocker.patch('pathlib.Path.open')
122122

123123
result = ConfigReader.merge(empty_args)

0 commit comments

Comments
 (0)