The check_yaml hook has parsing issues when parsing a list containing an unquoted string with a colon, e.g.
Can be fixed by configuring ruamel-yaml such that it's using its pure Python implementation instead of libyaml, like explained here: https://stackoverflow.com/a/62160118/704821
Affected code:
|
yaml = ruamel.yaml.YAML(typ='safe') |
Fix:
- yaml = ruamel.yaml.YAML(typ='safe')
+ yaml = ruamel.yaml.YAML(typ='safe', pure=True)
This may lead to slower parsing though.
The
check_yamlhook has parsing issues when parsing a list containing an unquoted string with a colon, e.g.Can be fixed by configuring ruamel-yaml such that it's using its pure Python implementation instead of libyaml, like explained here: https://stackoverflow.com/a/62160118/704821
Affected code:
pre-commit-hooks/pre_commit_hooks/check_yaml.py
Line 11 in 6306a48
Fix: