-
Notifications
You must be signed in to change notification settings - Fork 974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatter: Implicit concatenation in compare expressions #7193
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
082193f
to
8fedeef
Compare
8fedeef
to
0079154
Compare
} | ||
|
||
impl<'a> BinaryLike<'a> { | ||
fn flatten( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mostly moved from flatten_binary_expression
except that it now supports compare expressions too
668d1c4
to
8f4ae4c
Compare
0079154
to
119a229
Compare
This comment was marked as outdated.
This comment was marked as outdated.
8f4ae4c
to
c2d42e9
Compare
119a229
to
6ad2032
Compare
6ad2032
to
203a9f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100% on twine!
203a9f0
to
3794585
Compare
Merge Activity
|
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 theBinaryExpression
andCompareExpression
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
Base