konsti
972f9a9c15
Fix formatting lambda with empty arguments ( #5944 )
...
**Summary** Fix implemented in
https://github.com/astral-sh/RustPython-Parser/pull/35 : Previously,
empty lambda arguments (e.g. `lambda: 1`) would get the range of the
entire expression, which leads to incorrect comment placement. Now empty
lambda arguments get an empty range between the `lambda` and the `:`
tokens.
**Test Plan** Added a regression test.
149 instances of unstable formatting remaining.
```
$ cargo run --bin ruff_dev --release -- format-dev --stability-check --error-file formatter-ecosystem-errors.txt --multi-project target/checkouts > formatter-ecosystem-progress.txt
$ rg "Unstable formatting" target/formatter-ecosystem-errors.txt | wc -l
149
```
2023-07-21 15:48:45 +02: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-13 09:27:25 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-07-19 11:47:56 +00:00
2023-07-19 11:47:56 +00:00
2023-07-15 15:50:47 +01:00
2023-07-10 12:32:15 +00: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-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-06-30 06:32:50 +00:00
2023-07-19 17:28:07 +02:00
2023-07-13 08:57:29 +02:00
2023-07-11 06:08:08 +00:00
2023-06-30 06:32:50 +00:00
2023-07-04 07:07:20 +00:00
2023-07-14 09:01:33 +02:00
2023-07-14 09:01:33 +02: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-21 12:07:51 +00: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-21 12:07:51 +00: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-17 10:38:59 +02: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-21 12:07:51 +00:00
2023-07-19 17:28:07 +02: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-13 09:27:25 +00: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-06-30 06:32:50 +00: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-04 07:07:20 +00:00
2023-07-20 10:07:22 +00:00
2023-06-27 09:29:40 +00: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-08 12:33:18 +02:00
2023-07-19 13:01:58 +02:00
2023-07-10 15:55:19 +02:00
2023-07-21 15:48:45 +02:00
2023-07-20 10:07:22 +00:00
2023-07-03 21:48:44 +02:00
2023-07-10 12:32:15 +00:00
2023-07-20 10:07:22 +00:00
2023-07-20 15:05:18 +00:00
2023-07-11 06:08:08 +00:00
2023-07-14 17:54:58 +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-08 12:33:18 +02: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-06-29 08:09:26 +02:00
2023-07-11 08:36:26 +02:00
2023-07-13 08:57:29 +02:00
2023-07-18 13:40:15 +02:00
2023-07-18 13:40:15 +02:00
2023-07-04 07:07:20 +00:00
2023-07-04 07:07:20 +00:00
2023-07-13 08:57:29 +02:00
2023-07-06 18:23:53 +00:00
2023-07-19 17:28:07 +02:00
2023-07-13 08:57:29 +02:00
2023-07-19 13:01:58 +02:00
2023-06-26 14:15:55 +02:00