-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Future of string_processing
#4208
Comments
Here are some examples of changes that string-processing makes in my codebase that I'd consider accepting in a standalone preview feature:
|
My 2-cents: I switched to Black's preview mode just for this feature. Otherwise, string processing is the vast majority of the time I spend manually formatting code. I would love to see this reach a place where it can be stabilized. I never had any problems with it, although I do understand there are many edge cases. I think splitting it into individual features makes a lot of sense so you can make incremental progress. I find splitting long strings really valuable, but understand it's a tough problem — we've been hesitant to tackle it in Ruff as well. |
Agreed with @zanieb this feature is the main reason I use Black over Ruff. Thinking about splitting all of my strings manually gives me Java-scented nightmares. |
We merged string processing in May 2020 (#1132), almost four years ago. A few months later, I put the feature behind a flag because there were too many related bugs (#1609). Four years later, we're still in basically the same state: most of the open issues in C: preview styleIssues with the preview and unstable style. Add the name of the responsible feature in the title.
are about string processing.
I'm also increasingly convinced that string_processing's core feature, splitting up long strings, would be exceedingly controversial if we ever did turn it on by default. It is just too hard for a tool to figure out how to split a string in a way that makes sense to readers of the code. However, there are other things that string_processing does, and some of those are valuable and could perhaps be split off.
So my proposal is:
If you're interested in getting any part of string_processing into stable Black, please contribute a PR moving it to a separate preview feature.
I ran string_processing on my work codebase and noticed a few specific changes that could be split out. I'll list them in a separate comment.
The text was updated successfully, but these errors were encountered: