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

Martin von Zweigbergk martinvonz at google.com
Wed May 8 17:13:30 EDT 2019


*From: *Augie Fackler <raf at durin42.com>
*Date: *Wed, May 8, 2019 at 2:05 PM
*To: *martinvonz
*Cc: *Matt Harbison, Mercurial-devel, Gregory Szorc


>
> > 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?
>

The example makes sense, but why would we want a one-tuple on multiple
lines?


>
> (list/set/dict literals won't be afflicted in this way, just tuples.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20190508/b60d1eb1/attachment.html>


More information about the Mercurial-devel mailing list