My experience with black is that it’s good enough for Python that it’s a waste of time to not use it. Sure, on many teams formatting discussions are friendly. But why even spend the time?
It also really democratizes the language, because even folks brand new to Python or who are inexperienced with programming in general end up with code that is well-formatted and consistent with everything else.
But what do you get in that regard by not using black? Maybe in 1% of cases you’ll find a better way of formatting that everyone will also agree is better. That doesn’t seem worth very much at all to me, especially when by not using it you have to do a lot of manual work across the entire team now to get the 99% that is free with black.
I’d be willing to bet that in many cases where you feel you need to fight against it, many other folks wouldn’t actually agree that your changes are objectively an improvement.
Now, to be clear, I’m sure it’s possible to find some examples where most programmers would come together and agree that black made the wrong decision. But my experience using it across entire teams is that this is surprisingly rare.
You're probably right, but I'm not interested in putting it to a vote. Most programmers are pretty bad at writing readable code. If the computer can understand the code, many consider it done.
google-java-format has been imposed from outside our team. It's not configurable, makes poor choices a lot more than 1% of the time, forces diffs to cover many more lines than needed, and vandalizes blocks that were already well-formatted by a professional for human readers.
I think there are few subjective style choices that are so egregious that a robot would have done a better job. Where I want enforcement is likely correctness and safety mistakes.
When you use a standard formatter, people adapt. It’s as if formatting becomes a part of the language. Yes, there’s some initial pain, and, yes, some constructions become awkward occasionally, but, if you really need to, you can generally tell the formatter not to mess with a specific section.
It also really democratizes the language, because even folks brand new to Python or who are inexperienced with programming in general end up with code that is well-formatted and consistent with everything else.