Blackening redux (was: Re: Auto-formatting code with black - object now if you have a strong opinion)
Augie Fackler
raf at durin42.com
Wed May 8 23:08:23 EDT 2019
> On May 8, 2019, at 23:06, Matt Harbison <mharbison72 at gmail.com> wrote:
>
> On Wed, 08 May 2019 22:28:10 -0400, Gregory Szorc <gregory.szorc at gmail.com> wrote:
>
>> On Wed, May 8, 2019 at 12:42 PM Augie Fackler <raf at durin42.com> wrote:
>>
>>
>> I'm pretty happy with the state of D6342.
>>
>> Out of curiosity, is Black opinionated about single versus double quotes?
>> AFAICT it seems to preserve whatever is there? That somewhat surprises me.
>
> https://phab.mercurial-scm.org/D5064 seems to show that it did care. I've gotten into the habit of single quotes, so I'm glad this round didn't change them around.
It does care - I passed the -S flag that skips string normalization so the change would have less noise in it. My ideal world is we do the blackening as two passes:
* Just whitespace/etc changes
* Convert all strings to doublequotes
once those are both done, in theory reformatting a file is as easy as just running `black` on it since we'd have the pyproject.toml in place.
More information about the Mercurial-devel
mailing list