Micha Reiser
c260762900
Formatter: Implicit concatenation in compare expressions
## Summary
This PR implements the logic for breaking implicit concatenated strings before compare expressions by building on top of #7145
The main change is a new `BinaryLike` enum that has the `BinaryExpression` and `CompareExpression` variants. Supporting both variants requires some downstream changes but doesn't introduce any new concepts.
## Test Plan
I added a few more tests. The compatibility improvements are minor but we now perfectly match black on twine 🥳
**PR**
| project | similarity index | total files | changed files |
|--------------|------------------:|------------------:|------------------:|
| cpython | 0.76083 | 1789 | 1632 |
| django | 0.99966 | 2760 | 58 |
| transformers | 0.99928 | 2587 | 454 |
| **twine** | 1.00000 | 33 | 0 | <-- improved
| typeshed | 0.99978 | 3496 | 2173 |
| **warehouse** | 0.99824 | 648 | 22 | <-- improved
| zulip | 0.99948 | 1437 | 28 |
**Base**
| project | similarity index | total files | changed files |
|--------------|------------------:|------------------:|------------------:|
| cpython | 0.76083 | 1789 | 1633 |
| django | 0.99966 | 2760 | 58 |
| transformers | 0.99928 | 2587 | 454 |
| twine | 0.99982 | 33 | 1 |
| typeshed | 0.99978 | 3496 | 2173 |
| warehouse | 0.99823 | 648 | 23 |
| zulip | 0.99948 | 1437 | 28 |
2023-09-08 11:32:20 +02:00
..
2023-09-08 11:32:20 +02:00
2023-08-26 12:29:58 +02:00