Charlie Marsh
615337a54d
Remove newline-insertion logic from JoinNodesBuilder ( #6205 )
...
## Summary
This PR moves the "insert empty lines" behavior out of
`JoinNodesBuilder` and into the `Suite` formatter. I find it a little
confusing that the logic is split between those two formatters right
now, and since this is _only_ used in that one place, IMO it is a bit
simpler to just inline it and use a single approach to tracking state
(right now, both are stateful).
The only other place this was used was for decorators. As a side effect,
we now remove blank lines in both of these cases, which is a known but
intentional deviation from Black (which preserves the empty line before
the comment in the first case):
```python
@foo
# Hello
@bar
def baz():
pass
@foo
@bar
def baz():
pass
```
2023-07-31 16:58:15 -04:00
..
2023-07-19 13:01:58 +02:00
2023-06-30 06:32:50 +00:00
2023-07-21 12:07:51 +00:00
2023-07-11 06:08:08 +00:00
2023-06-30 06:32:50 +00:00
2023-07-13 09:27:25 +00:00
2023-07-11 16:40:28 +02:00
2023-07-21 12:07:51 +00:00
2023-06-30 06:32:50 +00:00
2023-07-31 12:48:17 +00:00
2023-07-19 11:47:56 +00:00
2023-07-15 15:50:47 +01:00
2023-07-29 10:06:26 -04:00
2023-06-30 06:32:50 +00:00
2023-07-11 16:40:28 +02:00
2023-07-19 13:01:58 +02:00
2023-06-30 06:32:50 +00:00
2023-07-03 21:48:44 +02:00
2023-07-19 13:01:58 +02:00
2023-06-30 06:32:50 +00:00
2023-07-19 17:28:07 +02:00
2023-07-19 17:28:07 +02:00
2023-07-24 07:04:40 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-07-31 10:46:40 +02:00
2023-07-13 08:57:29 +02:00
2023-07-11 06:08:08 +00:00
2023-07-31 16:58:15 -04:00
2023-07-04 07:07:20 +00:00
2023-07-27 10:22:13 -04:00
2023-07-27 10:22:13 -04:00
2023-07-13 09:27:25 +00:00
2023-06-30 06:32:50 +00:00
2023-07-14 09:01:33 +02:00
2023-07-31 10:46:40 +02:00
2023-07-14 09:01:33 +02:00
2023-06-30 06:32:50 +00:00
2023-07-03 21:48:44 +02:00
2023-07-13 08:57:29 +02:00
2023-07-31 12:01:45 -04:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-07-11 16:51:24 +02:00
2023-06-30 06:32:50 +00:00
2023-07-26 16:21:23 +00:00
2023-06-30 06:32:50 +00:00
2023-07-13 09:27:25 +00:00
2023-07-04 07:07:20 +00:00
2023-07-31 12:01:45 -04:00
2023-07-26 16:21:23 +00:00
2023-07-04 07:07:20 +00:00
2023-07-19 17:28:07 +02:00
2023-07-19 11:47:56 +00:00
2023-07-21 12:07:51 +00:00
2023-07-10 21:23:49 +02:00
2023-07-19 11:47:56 +00:00
2023-07-13 09:27:25 +00:00
2023-07-15 17:35:23 +01:00
2023-07-11 16:40:28 +02:00
2023-07-31 10:46:40 +02:00
2023-07-14 09:01:33 +02:00
2023-07-11 14:07:39 +02:00
2023-07-14 09:01:33 +02:00
2023-07-31 10:46:40 +02:00
2023-06-30 06:32:50 +00:00
2023-06-30 10:13:23 +02:00
2023-07-11 16:40:28 +02:00
2023-07-25 11:49:05 +02:00
2023-07-24 18:30:42 +02:00
2023-07-20 10:07:22 +00:00
2023-06-27 09:29:40 +00:00
2023-07-31 10:46:40 +02:00
2023-07-11 16:51:24 +02:00
2023-07-14 17:54:58 +02:00
2023-07-20 10:07:22 +00:00
2023-07-23 14:32:16 +02:00
2023-07-19 13:01:58 +02:00
2023-07-10 15:55:19 +02:00
2023-07-27 10:22:13 -04:00
2023-07-24 14:44:36 +00:00
2023-07-03 21:48:44 +02:00
2023-07-29 10:06:26 -04:00
2023-07-20 10:07:22 +00:00
2023-07-20 15:05:18 +00:00
2023-07-25 11:49:05 +02:00
2023-07-31 19:25:16 +02:00
2023-07-10 21:23:49 +02:00
2023-07-11 14:07:39 +02:00
2023-07-21 12:07:51 +00:00
2023-07-21 12:07:51 +00:00
2023-07-27 10:22:13 -04:00
2023-07-13 10:51:25 +00:00
2023-07-14 09:01:33 +02:00
2023-07-13 16:00:49 +02:00
2023-07-13 10:51:25 +00:00
2023-06-26 14:15:55 +02:00
2023-07-26 16:21:23 +00:00
2023-07-23 14:32:16 +02:00
2023-07-13 08:57:29 +02:00
2023-07-18 13:40:15 +02:00
2023-07-29 14:39:42 +00:00
2023-07-26 16:21:23 +00:00
2023-07-04 07:07:20 +00:00
2023-07-04 07:07:20 +00:00
2023-07-29 14:39:42 +00:00
2023-07-13 08:57:29 +02:00
2023-07-26 16:21:23 +00:00
2023-07-19 17:28:07 +02:00
2023-07-13 08:57:29 +02:00
2023-07-24 18:12:07 +00:00
2023-06-26 14:15:55 +02:00