python-trio / python-trio/trio
yaml formatting/linting
@kachida is already working on this.
Since Mar 31, 2025.
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 431
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 6
Description
breaking out from #3157
in flake8-async we've been using https://github.com/jumanjihouse/pre-commit-hook-yamlfmt for a while, but it mostly just handles indentation.
Looking around a bit I found yamllint, which has rules for quoting - with sufficient complexity it should satisfy @webknjaz (https://github.com/python-trio/trio/pull/3157#discussion_r1891024219)
https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.quoted_strings
Neither of the above tools can enforce block- vs flow-style arrays, but I found https://lyz-code.github.io/yamlfix/#sequence-list-style
yamlfix also has some quote rules: https://lyz-code.github.io/yamlfix/#quote-basic-values
tl;dr: yamlfix should be good
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.