Commit graph

6 commits

Author SHA1 Message Date
Ruud van Asseldonk
a070021547 Make a trailing comma always force tall
At first I thought, “but a single-element collection should always fit,
right?” And sure it fits, but then I reformatted a larger experimental
config I have, including some GitHub Actions, and it turns out that
sometimes I prefer even single-element litst to be tall. Black is right
about this. I should be less opinionated, leave it to the user.
2024-06-18 19:23:40 +02:00
Ruud van Asseldonk
b0a44ec583 Implement magic trailing comma for collections
This gives users a bit more control over whether things get formatted
wide or tall. This matters in practice, as Black learned the hard way,
and I did as well in the GitHub Actions example.
2024-06-15 21:55:38 +02:00
Ruud van Asseldonk
606376f2d9 Run new autoformatter on all examples
In the past I did not autoformat them because I was not happy with the
output yet, but now the formatter is good enough that I'm willing to
take this. There are still a few cases where I'm like ... meh, but that
requires human judgement that I think a formatter can never get right,
so I'm willing to stop arguing about this to get a formatter.

Possibly in the future I can add the magic trailing comma like Black has
in Python, to force collections to be tall. That could still be nice.
We can do that in a follow-up.
2024-06-15 21:18:08 +02:00
Ruud van Asseldonk
878eaa4aa4 Use comma as the separator in record notation
I am still ambivalent about this. On the one hand I have a strong sense
that "key = value;" is a statement that needs a terminator. On the other
hand, it makes things more uniform to have only a single separator.

I think I just need to get used to the comma, and then I will not mind
so much. But let's see.
2023-10-21 10:43:44 +02:00
Ruud van Asseldonk
93cdd59a2c Make GitHub Actions example more powerful
Show off the f-strings and loops.
2023-09-20 22:47:00 +02:00
Ruud van Asseldonk
33391d2ea1 Add a GitHub Actions example
GitHub Actions is one of those things that tends to have a lot of
repetition, where RCL may come in handy.
2023-09-20 22:41:59 +02:00