mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 00:54:42 +04:00
Merge pull request #779 from pre-commit/yaml_load
Appease yaml.load linters
This commit is contained in:
commit
6853f4aa4c
1 changed files with 1 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ def _migrate_map(contents):
|
||||||
# will yield a valid configuration
|
# will yield a valid configuration
|
||||||
try:
|
try:
|
||||||
trial_contents = header + 'repos:\n' + rest
|
trial_contents = header + 'repos:\n' + rest
|
||||||
yaml.load(trial_contents)
|
ordered_load(trial_contents)
|
||||||
contents = trial_contents
|
contents = trial_contents
|
||||||
except yaml.YAMLError:
|
except yaml.YAMLError:
|
||||||
contents = header + 'repos:\n' + _indent(rest)
|
contents = header + 'repos:\n' + _indent(rest)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue