On Sun, Nov 14, 2021, at 09:13, Charles R Harris wrote:
The black formatter is much improved in its latest version and I think good enough to start using. The main drawbacks that I see are:
  • all operators, including '*' and '/',  get spaces around them,
  • very long strings are not broken into multiple lines,
  • lists, tuples, and function signatures are either on one line, or broken into multiple lines of one element/argument each,
  • the formatting of extended logical expressions could be improved to emphasize the priority of 'and' over 'or' operators

We've also been having a conversation around mathematical formatting here: https://discuss.scientific-python.org/t/how-to-format-mathematical-expressions/62/8

I tried yapf recently, and was pleased with the output.  One concern about yapf was that it has many configuration options: but the only important thing is that you fix the knobs, then you simply have a different version of black.

In my experience, while none of these tools are perfect, not having to have discussions around formatting is completely worth it!