Open mdczaplicki opened 8 months ago
Thank's @mdczaplicki for opening the issue. I understand that you don't like Ruff splitting the array after each element. I, unfortunately, haven't had a lot of time working on it but we've started a discussion around formatting arrays in https://github.com/astral-sh/ruff/discussions/8452 I want to keep this issue open because it is slightly different in that the list elements aren't sub-lists but tuples.
One escape hatch for now is that you can add a fmt: skip
comment at the end of the decorator. It's not semantically identical to using a fmt:off
- fmt:on
region because it also disables formatting of the rest of the decorator. But it might help unblock you for now. See this playground
Thanks @MichaReiser, fmt: skip
works just fine. Now I can switch from black
😁
I have a test that is heavily parametrized. Like this:
I want to maintain the readability of this by having exactly the same amount of distance between each value. I doesn't work with
# fmt: off
inside the decorator. In order for this to work - I'd have to surround whole test in afmt: off
, which I don't want to do.