konsti
9a817a2922
Insert empty line between suite and alternative branch after def/class ( #12294 )
...
When there is a function or class definition at the end of a suite
followed by the beginning of an alternative block, we have to insert a
single empty line between them.
In the if-else-statement example below, we insert an empty line after
the `foo` in the if-block, but none after the else-block `foo`, since in
the latter case the enclosing suite already adds empty lines.
```python
if sys.version_info >= (3, 10):
def foo():
return "new"
else:
def foo():
return "old"
class Bar:
pass
```
To do so, we track whether the current suite is the last one in the
current statement with a new option on the suite kind.
Fixes #12199
---------
Co-authored-by: Micha Reiser <micha@reiser.io >
2024-07-15 12:59:33 +02:00
..
2024-02-29 10:00:51 +01:00
2024-01-10 12:09:34 +00:00
2023-11-30 00:09:55 +00:00
2023-12-21 04:20:17 +00:00
2023-11-30 00:09:55 +00:00
2024-07-15 12:59:33 +02:00
2023-11-30 00:09:55 +00:00
2024-02-29 10:00:51 +01:00
2023-11-30 00:09:55 +00:00
2023-11-30 00:09:55 +00:00
2024-02-29 10:00:51 +01:00
2023-11-30 00:09:55 +00:00
2024-02-29 10:00:51 +01:00
2023-11-30 00:09:55 +00:00
2023-11-30 00:09:55 +00:00
2024-02-29 10:00:51 +01:00
2024-02-29 10:00:51 +01:00
2023-11-30 00:09:55 +00:00
2023-11-30 00:09:55 +00:00
2024-02-29 10:00:51 +01:00
2024-02-29 10:00:51 +01:00
2023-11-30 21:49:28 -05:00
2024-07-15 12:59:33 +02:00
2024-02-29 10:00:51 +01:00
2023-12-06 07:15:06 +00:00
2024-02-29 10:00:51 +01:00
2024-01-31 11:13:37 +01:00
2024-01-31 11:13:37 +01:00
2024-02-29 10:00:51 +01:00
2023-11-30 00:09:55 +00:00
2024-01-31 00:09:38 +05:30
2024-02-29 10:00:51 +01:00
2023-11-30 00:09:55 +00:00
2024-02-29 10:00:51 +01:00
2024-03-13 02:34:23 +00:00
2024-02-29 10:00:51 +01:00
2023-11-30 00:09:55 +00:00
2024-01-10 12:09:34 +00:00
2024-02-29 10:00:51 +01:00
2024-02-29 10:00:51 +01:00
2023-11-30 00:09:55 +00:00
2023-11-30 00:09:55 +00:00
2024-01-10 12:09:34 +00:00
2024-02-29 10:00:51 +01:00
2024-02-29 10:00:51 +01:00
2024-02-29 10:00:51 +01:00
2023-11-30 00:09:55 +00:00
2023-11-30 00:09:55 +00:00
2024-02-29 10:00:51 +01:00
2023-11-30 00:09:55 +00:00
2024-02-29 10:00:51 +01:00
2024-01-26 08:18:30 +01:00
2023-11-30 00:09:55 +00:00
2023-11-30 00:09:55 +00:00
2023-12-13 03:43:23 +00:00
2023-11-30 21:49:28 -05:00
2024-01-04 19:39:37 -05:00
2024-02-29 10:00:51 +01:00
2023-12-19 00:43:20 -06:00
2023-11-30 00:09:55 +00:00
2023-11-30 00:09:55 +00:00
2023-11-30 00:09:55 +00:00
2024-02-29 10:00:51 +01:00
2024-02-29 10:00:51 +01:00
2024-02-29 10:00:51 +01:00
2024-02-29 10:00:51 +01:00
2024-07-15 12:59:33 +02:00
2024-02-29 09:30:54 +01:00
2023-11-30 00:09:55 +00:00
2023-11-30 00:09:55 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2024-02-29 09:30:54 +01:00
2023-11-09 01:49:24 +00:00
2024-02-29 09:30:54 +01:00
2023-11-30 21:11:14 -05:00
2024-01-30 10:08:50 +00:00
2023-11-09 01:49:24 +00:00
2024-01-30 10:08:50 +00:00
2024-01-30 10:08:50 +00:00
2024-02-29 09:30:54 +01:00
2024-02-05 13:29:24 +00:00
2024-06-05 17:55:14 +02:00
2024-02-12 16:09:13 +01:00
2024-03-13 02:34:23 +00:00
2024-04-18 17:57:39 +05:30
2023-11-09 01:49:24 +00:00
2024-04-18 17:57:39 +05:30
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-17 12:24:19 -05:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-12-14 04:58:17 +00:00
2023-11-09 01:49:24 +00:00
2024-01-30 10:08:50 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2024-03-13 02:34:23 +00:00
2024-05-13 13:22:35 +00:00
2023-11-09 01:49:24 +00:00
2023-11-30 21:11:14 -05:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2024-07-11 22:38:12 +02:00
2023-11-09 01:49:24 +00:00
2024-04-18 17:57:39 +05:30
2023-11-09 01:49:24 +00:00
2024-02-29 09:30:54 +01:00
2023-11-09 01:49:24 +00:00
2024-04-18 17:57:39 +05:30
2023-11-30 21:11:14 -05:00
2023-11-09 01:49:24 +00:00
2024-02-29 09:30:54 +01:00
2024-03-20 20:30:22 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2024-01-30 10:08:50 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2024-01-30 10:08:50 +00:00
2023-11-09 01:49:24 +00:00
2024-01-30 10:08:50 +00:00
2023-11-09 01:49:24 +00:00
2024-03-13 02:34:23 +00:00
2023-11-09 01:49:24 +00:00
2024-03-13 02:34:23 +00:00
2024-02-29 09:30:54 +01:00
2023-11-09 01:49:24 +00:00
2024-03-13 02:34:23 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2024-01-04 19:39:37 -05:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2024-02-29 09:30:54 +01:00
2024-07-15 12:59:33 +02:00
2024-07-15 12:59:33 +02:00
2024-02-29 09:30:54 +01:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2023-11-30 21:49:28 -05:00
2024-02-29 09:30:54 +01:00
2024-02-29 09:30:54 +01:00
2024-01-31 11:13:37 +01:00
2024-03-13 02:34:23 +00:00
2024-01-31 11:13:37 +01:00
2024-01-31 11:13:37 +01:00
2024-01-31 11:13:37 +01:00
2024-01-31 11:13:37 +01:00
2024-01-31 11:13:37 +01:00
2024-02-02 17:56:25 +01:00
2024-01-31 11:13:37 +01:00
2024-01-31 11:13:37 +01:00
2024-01-31 11:13:37 +01:00
2024-01-31 11:13:37 +01:00
2024-01-31 11:13:37 +01:00
2024-02-02 17:56:25 +01:00
2024-01-31 11:13:37 +01:00
2024-02-02 17:56:25 +01:00
2024-01-31 11:13:37 +01:00
2024-01-31 11:13:37 +01:00
2024-01-31 11:13:37 +01:00
2024-01-31 11:13:37 +01:00
2024-01-30 10:08:50 +00:00
2024-02-29 09:30:54 +01:00
2023-11-09 01:49:24 +00:00
2024-02-29 09:30:54 +01:00
2024-03-13 02:34:23 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2024-02-29 09:30:54 +01:00
2023-11-09 01:49:24 +00:00
2023-12-03 19:15:40 -05:00
2023-11-09 01:49:24 +00:00
2024-07-15 12:59:33 +02:00
2023-11-09 01:49:24 +00:00
2024-07-15 12:59:33 +02:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2024-02-29 09:30:54 +01:00
2024-01-08 14:47:01 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2024-03-13 02:34:23 +00:00
2024-02-29 09:30:54 +01:00
2023-11-09 01:49:24 +00:00
2024-05-31 12:06:17 +00:00
2024-02-29 09:30:54 +01:00
2023-11-09 01:49:24 +00:00
2024-07-15 12:59:33 +02:00
2024-04-26 09:47:29 +02:00
2023-11-09 01:49:24 +00:00
2024-03-08 23:48:47 +00:00
2024-03-08 23:56:02 +00:00
2024-01-31 00:09:38 +05:30
2024-07-15 12:59:33 +02:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00
2024-07-15 12:59:33 +02:00
2023-11-09 01:49:24 +00:00
2024-01-30 10:08:50 +00:00
2023-11-09 01:49:24 +00:00
2023-11-09 01:49:24 +00:00