Blackening redux (was: Re: Auto-formatting code with black - object now if you have a strong opinion)

Augie Fackler raf at durin42.com
Thu May 9 11:51:24 EDT 2019



> On May 9, 2019, at 11:26, Gregory Szorc <gregory.szorc at gmail.com> wrote:
> 
> 
> 
>> On May 8, 2019, at 20:09, Augie Fackler <raf at durin42.com> wrote:
>> 
>> 
>> 
>>>> On May 8, 2019, at 23:08, Martin von Zweigbergk <martinvonz at google.com> wrote:
>>>> 
>>>> Out of curiosity, is Black opinionated about single versus double quotes? AFAICT it seems to preserve whatever is there? That somewhat surprises me.
>>> 
>>> That surprises me too. I'm pretty sure an earlier version of that patch changed them all to double quotes. Augie, is that something you changed in black?
>> 
>> It's a CLI flag - you can skip the normalization, but eventually in the name of consistency I'd like to formatterize that too.
> 
> Got it. And I’m fine doing it that way.
> 
> Is there any way to normalize on single quotes? I’m lazy and don’t like pressing the shift key :)

Nope. It's black. You can have any color quotes you want, as long as they're doublequotes.

> But I can live with double quotes. Especially if running black on file save will correct my laziness for me.

If we standardize on black, I'll also put a file in contrib that will be the relevant `hg fix` configuration. It's glorious.



More information about the Mercurial-devel mailing list