Closed
Conversation
Member
Author
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
Merged
MichaReiser
commented
Aug 24, 2023
Comment on lines
+239
to
+264
| assert { | ||
| key1: value1, | ||
| key2: value2, | ||
| key3: value3, | ||
| key4: value4, | ||
| key5: value5, | ||
| key6: value6, | ||
| key7: value7, | ||
| key8: value8, | ||
| key9: value9, | ||
| } == expectedeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, "Not what we expected and the message is too long to fit in one lin" |
Member
Author
There was a problem hiding this comment.
String should be parenthesized
MichaReiser
commented
Aug 24, 2023
crates/ruff_python_formatter/tests/snapshots/format@statement__assert.py.snap
Show resolved
Hide resolved
MichaReiser
commented
Aug 24, 2023
Comment on lines
+251
to
+276
| assert { | ||
| key1: value1, | ||
| key2: value2, | ||
| key3: value3, | ||
| key4: value4, | ||
| key5: value5, | ||
| key6: value6, | ||
| key7: value7, | ||
| key8: value8, | ||
| key9: value9, | ||
| } == expectedeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, "Not what we expected and the message is too long to fit in one lineeeeeeeeeeeeeeeee" |
Member
Author
There was a problem hiding this comment.
String should be parenthesized
This comment was marked as outdated.
This comment was marked as outdated.
5070d10 to
d1a76d0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
This is a POC of formatting assertions where the left side is a
can_omit_optional_parentheesexpressionstarting with a parenthesized expression and the right is a string.
This PR doesn't perfectly match black yet, but the similarity index aren't improving for any of our tested projects, which makes me question whether this is worth perusing.
I'm putting this up to get feedback on how important this formatting is. You can ignore the implementation and just look at the
assert.pychanges.Test Plan