Auto-formatting code with black - object now if you have a strong opinion

Pulkit Goyal 7895pulkit at gmail.com
Tue Nov 27 11:09:20 EST 2018


I am +1 on using black.

Adding to what Augie said, we plan to preserve the annotate history by
commiting the changes with something like "# skip-blame" in commit message.
We can then skip those revisions while annotating using the `--skip` flag
of `hg annotate` which accepts a revset, something like `hg annotate --skip
"desc('# skip-blame')"`.

Maybe we should use "# skip-blame black-changes" to mark those changes as
black specific and to differentiate between py3 and black changes. (We
already use "# skip-blame" for py3 related trivial changes.)

On Tue, Nov 27, 2018 at 6:54 PM Augie Fackler <raf at durin42.com> wrote:

> In https://phab.mercurial-scm.org/D5064 we're talking about using the
> `black` formatter from Ɓukasz Langa on hg. This will imply a few style
> changes to our codebase, notably:
>
>  * We'll use " everywhere instead of '
>  * Import formatting will change a bit
>  * We'll have two blank lines between top-level items in a module
>
> Everything else is, as best I can tell, a minor style change of sorts. My
> preference at this point is to land the change and just give our formatting
> entirely to black, even if at the edges I disagree with some of black's
> decisions. Does anyone have a strong opinion _against_ using black to
> format our code?
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20181127/0f18b282/attachment.html>


More information about the Mercurial-devel mailing list