Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c3e4383

Browse files
committed
Appease yaml.load linters
_technically_ yaml.load is unsafe, however the contents being loaded here are previously loaded just above using a safe loader so this is not an abitrary code vector. Fixing it nonetheless :)
1 parent ebb178a commit c3e4383

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pre_commit/commands/migrate_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def _migrate_map(contents):
3232
# will yield a valid configuration
3333
try:
3434
trial_contents = header + 'repos:\n' + rest
35-
yaml.load(trial_contents)
35+
ordered_load(trial_contents)
3636
contents = trial_contents
3737
except yaml.YAMLError:
3838
contents = header + 'repos:\n' + _indent(rest)

0 commit comments

Comments
 (0)