Charlie Marsh
95f78821ad
Fix parenthesized detection for tuples (#6599)
## Summary
This PR fixes our code for detecting whether a tuple has its own
parentheses, which is necessary when attempting to preserve parentheses.
As-is, we were getting some cases wrong, like `(a := 1), (b := 3))` --
the detection code inferred that this _was_ parenthesized, and so
wrapped the entire thing in an unnecessary set of parentheses.
## Test Plan
`cargo test`
Before:
| project | similarity index |
|--------------|------------------|
| cpython | 0.75472 |
| django | 0.99804 |
| transformers | 0.99618 |
| twine | 0.99876 |
| typeshed | 0.74288 |
| warehouse | 0.99601 |
| zulip | 0.99727 |
After:
| project | similarity index |
|--------------|------------------|
| cpython | 0.75473 |
| django | 0.99804 |
| transformers | 0.99618 |
| twine | 0.99876 |
| typeshed | 0.74288 |
| warehouse | 0.99601 |
| zulip | 0.99727 |
2023-08-16 13:20:48 +00:00
..
2023-07-19 13:01:58 +02:00
2023-06-30 06:32:50 +00:00
2023-08-01 08:26:30 +02:00
2023-07-11 06:08:08 +00:00
2023-08-14 12:28:58 +00:00
2023-08-01 08:26:30 +02:00
2023-07-11 16:40:28 +02:00
2023-08-01 08:26:30 +02:00
2023-06-30 06:32:50 +00:00
2023-08-01 08:26:30 +02:00
2023-07-29 10:06:26 -04:00
2023-08-16 08:31:25 +05:30
2023-08-16 08:31:25 +05:30
2023-08-16 08:31:25 +05:30
2023-08-16 08:31:25 +05:30
2023-08-16 08:31:25 +05:30
2023-07-19 13:01:58 +02:00
2023-08-16 08:31:25 +05:30
2023-07-24 07:04:40 +00:00
2023-06-30 06:32:50 +00:00
2023-08-15 07:15:33 -04:00
2023-08-15 18:59:18 +00:00
2023-07-31 16:58:15 -04:00
2023-08-03 20:45:03 +00:00
2023-08-03 20:45:03 +00:00
2023-08-14 12:28:58 +00:00
2023-08-01 08:26:30 +02:00
2023-08-04 13:58:01 +00:00
2023-08-14 15:57:36 +00:00
2023-08-14 15:57:36 +00:00
2023-08-14 15:57:36 +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-08-01 15:30:59 +00:00
2023-08-04 13:58:01 +00:00
2023-07-26 16:21:23 +00:00
2023-08-15 18:59:18 +00:00
2023-08-15 18:59:18 +00:00
2023-07-10 21:23:49 +02:00
2023-07-19 11:47:56 +00:00
2023-08-01 08:26:30 +02:00
2023-08-15 18:59:18 +00:00
2023-08-08 08:45:20 -04: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-08-14 12:28:58 +00:00
2023-07-11 16:40:28 +02:00
2023-08-15 18:59:18 +00:00
2023-08-07 12:22:33 -05:00
2023-08-08 09:15:35 +00:00
2023-08-07 12:22:33 -05:00
2023-07-31 10:46:40 +02:00
2023-08-15 18:59:18 +00:00
2023-08-11 17:58:42 +00:00
2023-08-08 08:45:20 -04:00
2023-08-08 09:15:35 +00:00
2023-08-11 09:22:30 +02:00
2023-08-15 18:59:18 +00:00
2023-07-10 15:55:19 +02:00
2023-08-14 17:38:56 +02:00
2023-08-04 14:00:54 +00:00
2023-08-08 08:45:20 -04:00
2023-08-11 01:54:46 -04:00
2023-07-20 10:07:22 +00:00
2023-07-20 15:05:18 +00:00
2023-08-11 17:58:42 +00:00
2023-08-15 18:59:18 +00:00
2023-07-31 19:25:16 +02:00
2023-08-16 13:20:48 +00: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-08-15 08:00:35 +02:00
2023-08-14 15:57:36 +00:00
2023-08-15 08:00:35 +02:00
2023-08-14 15:57:36 +00:00
2023-08-15 08:00:35 +02:00
2023-08-14 15:57:36 +00:00
2023-08-15 08:00:35 +02:00
2023-08-14 15:57:36 +00:00
2023-08-14 15:57:36 +00:00
2023-08-14 15:57:36 +00:00
2023-08-14 15:57:36 +00:00
2023-08-14 15:57:36 +00:00
2023-08-11 13:33:15 +00:00
2023-08-15 18:59:18 +00:00
2023-08-16 08:31:25 +05:30
2023-08-16 08:31:25 +05:30
2023-07-27 10:22:13 -04:00
2023-07-13 10:51:25 +00:00
2023-08-15 18:59:18 +00:00
2023-08-15 18:59:18 +00:00
2023-07-13 10:51:25 +00:00
2023-06-26 14:15:55 +02:00
2023-08-02 20:29:28 +00:00
2023-08-08 09:15:35 +00:00
2023-08-16 13:20:48 +00:00
2023-08-11 18:28:48 +00:00
2023-08-02 19:55:00 +00:00
2023-08-11 11:21:16 +00:00
2023-08-15 07:15:33 -04:00
2023-08-15 07:15:33 -04:00
2023-08-16 08:31:25 +05:30
2023-08-02 19:55:00 +00:00
2023-08-15 18:59:18 +00:00
2023-08-15 18:59:18 +00:00
2023-08-15 09:33:57 +02:00
2023-08-15 09:33:57 +02:00
2023-08-03 20:45:03 +00:00
2023-08-02 20:40:32 +00:00
2023-07-13 08:57:29 +02:00
2023-08-15 18:59:18 +00:00
2023-06-26 14:15:55 +02:00