This applied black to the 20 smallest files in mercurial/:
ls -S1 mercurial/*.py | tail -n20 | xargs black
Where do we stand on the intent to mass reformat the code base?
I'm not super thrilled at some of black's decisions (like using double quotes for all strings and merging imports into the same line which leads to excessive code churn later). But the exact style doesn't matter as much as having it be consistent. So I'm willing to go with black if we feel it's the best tool for the job. I'm not sure what the alternatives are these days.
I'm surprised by this result. I'd like to think the reformatting tool would be smarter than this.
Yep. I find I care less about style decisions when the computer is able to make them for me: eg I prefer ' to ", but since black can fix that and I don't have to type the " myself, I don't really care.
Does anyone strongly object, or do we want to embrace black and the formatting changes it implies?
My plan was to put an hg fix configuration in contrib and mention it in ContributingChanges. I'd advise against a hook for this, but if someone else wanted to write one I'd at least drop it in contrib as an example...