Skip to content

Commit 1119d5a

Browse files
committed
Remove last usage of yaml.safe_load
1 parent fd49d0a commit 1119d5a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

pre_commit_hooks/util.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
import sys
77
from datetime import datetime
88

9-
from ruamel import yaml
9+
import ruamel.yaml
10+
11+
yaml = ruamel.yaml.YAML(typ="safe")
1012

1113
# Plist data types and their Python equivalents
1214
PLIST_TYPES = {
@@ -31,7 +33,7 @@ def load_autopkg_recipe(path):
3133
try:
3234
# try to read it as yaml
3335
with open(path, "rb") as f:
34-
recipe = yaml.safe_load(f)
36+
recipe = yaml.load(f)
3537
except Exception as err:
3638
print("{}: yaml parsing error: {}".format(path, err))
3739
elif path.endswith(".json"):

0 commit comments

Comments
 (0)