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 17:05:22 EDT 2019



> On May 8, 2019, at 16:53, martinvonz <martinvonz at google.com> wrote:
> 
>>  * one-tuples will get forced down to a single line, even if they started on multiple lines
> 
> I don't know what this means. One-tuples are very rare anyway, so it probably doesn't matter much.

If you write this:

FOO = (
    'bar',
)

black will make it be

FOO = ('bar',)

even though there's a trailing comma, because it's the one place where a trailing comma is required in Python. Does that make sense?

(list/set/dict literals won't be afflicted in this way, just tuples.)


More information about the Mercurial-devel mailing list