-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Prototype Black's string joining/splitting #4449
Conversation
Current dependencies on/for this PR: This comment was auto-generated by Graphite. |
14c7cd2
to
4d16f03
Compare
40ae4a8
to
5767c6f
Compare
let format_str = format_with(|f| { | ||
write!(f, [text("\"")])?; | ||
|
||
let mut words = self.0.split_whitespace().peekable(); |
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.
The "real" implementation will need to be more careful to keep the number of whitespace between any two words the same. We can use [soft_line_break, if_group_fits(&text("<num_spaces>"))]
to accomplish this.
PR Check ResultsEcosystem✅ ecosystem check detected no changes. BenchmarkLinux
Windows
|
Fix AST generated from a dict literal containing dict unpacking
This PR adds a test to verify that the
fill
element can be used to implement Black's string-processingThe "full" implementation needs to split all strings by words and create a single
fill
element for it. But that seems straightforward so that it isn't covered by this test.