Files
shredos.x86_64/support/testing/tests/package/sample_python_yamllint.py

14 lines
294 B
Python
Raw Normal View History

2025-01-10 19:31:27 +00:00
# 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)