Files
shredos.x86_64/support/testing/tests/package/sample_python_yamllint.py
2025-01-10 19:34:56 +00:00

14 lines
294 B
Python

# example form https://yamllint.readthedocs.io/en/stable/development.html
from yamllint import (config, linter)
data = '''---
- &anchor
foo: bar
- *anchor
'''
yaml_config = config.YamlLintConfig("extends: default")
for p in linter.run(data, yaml_config):
print(p.desc, p.line, p.rule)