Auto-formatting YAML files with yamlfmt
I decided to see if there was an equivalent of Black or Prettier for YAML files. I found yamlfmt from Google. Update : It turns out Prettier can format YAML too.
3 posts tagged “formatting”.
I decided to see if there was an equivalent of Black or Prettier for YAML files. I found yamlfmt from Google. Update : It turns out Prettier can format YAML too.
I decided to enforce that all code examples in the Datasette documentation be formatted using Black. Here's issue 1718 where I researched the options for doing this. I found the blacken-docs tool.
Here's how to format a number in Jinja with commas for thousands, without needing any custom filters or template functions: {{ "{:,}".format(row count) }} Output looks like this: 179,119 Bonus: here's…