python-trio / python-trio/trio

yaml formatting/linting

Open
#3,164 5 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.