1# example form https://yamllint.readthedocs.io/en/stable/development.html
2
3from yamllint import (config, linter)
4
5data = '''---
6- &anchor
7  foo: bar
8- *anchor
9'''
10
11yaml_config = config.YamlLintConfig("extends: default")
12for p in linter.run(data, yaml_config):
13    print(p.desc, p.line, p.rule)
14