Changing Auto-Formatters

31 views
Skip to first unread message

Andrew Grieve

unread,
Oct 20, 2022, 10:19:30 PM10/20/22
to python
Google's just released a fork of Black, which looks like it would work well for us:

I've filed https://bugs.chromium.org/p/chromium/issues/detail?id=1377174 to look at switching to it in case anyone wants to take a crack at it.

Nico Weber

unread,
Oct 21, 2022, 8:24:01 AM10/21/22
to Andrew Grieve, python
Seems like a bunch of churn. Are the benefits really big enough?

--
You received this message because you are subscribed to the Google Groups "python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python+un...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/python/CABiQX1XvJqZDVC2Qh7z-qyeD22SAGxvNS9G48XO02_51S1LF2w%40mail.gmail.com.

Andrew Grieve

unread,
Oct 21, 2022, 9:44:39 AM10/21/22
to Nico Weber, python
I think it's at least worth investigating. If it normalizes quotes within a file, it will pay for itself.

Mike Frysinger

unread,
Nov 28, 2022, 7:58:38 AM11/28/22
to Andrew Grieve, Nico Weber, python
CrOS switched to black and just reformatted things.  it's a one-off churn, but there really isn't any reasonable alternative out there.  yapf is dead.
-mike

Philipp Wollermann

unread,
Oct 11, 2023, 1:25:28 AM10/11/23
to python, vap...@chromium.org, tha...@chromium.org, python, Andrew Grieve
I found this thread when I was frustrated with the behavior of the current YAPF autoformatter while contributing to the Python files in our infra repository.

I added a comment on Andrew's bug with some reasoning why I think we should move to Black, so that we can get fully deterministic auto-formatting for our Python code.

How can we reach consensus here? I'm willing to volunteer and invest time into whatever is necessary to make it happen.

Cheers,
Philipp

Andrew Grieve

unread,
Oct 11, 2023, 9:57:12 AM10/11/23
to Philipp Wollermann, python, vap...@chromium.org, tha...@chromium.org
Let's consolidate conversation on this bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1377174

Dirk Pranke

unread,
Oct 12, 2023, 4:04:34 PM10/12/23
to Philipp Wollermann, python, vap...@chromium.org, tha...@chromium.org, Andrew Grieve
On Tue, Oct 10, 2023 at 10:25 PM 'Philipp Wollermann' via python <pyt...@chromium.org> wrote:
I found this thread when I was frustrated with the behavior of the current YAPF autoformatter while contributing to the Python files in our infra repository.

I added a comment on Andrew's bug with some reasoning why I think we should move to Black, so that we can get fully deterministic auto-formatting for our Python code.

How can we reach consensus here? I'm willing to volunteer and invest time into whatever is necessary to make it happen.

Put together a proposal for it that'll include what sorts of formatting will change and how we might want to handle mass reformats and different parts of the codebase having different style guide settings, I think.

-- Dirk

Cheers,
Philipp



On Monday, November 28, 2022 at 9:58:38 PM UTC+9 vap...@chromium.org wrote:
CrOS switched to black and just reformatted things.  it's a one-off churn, but there really isn't any reasonable alternative out there.  yapf is dead.
-mike

On Fri, Oct 21, 2022 at 10:44 PM 'Andrew Grieve' via python <pyt...@chromium.org> wrote:
I think it's at least worth investigating. If it normalizes quotes within a file, it will pay for itself.

On Fri, Oct 21, 2022 at 8:24 AM Nico Weber <tha...@chromium.org> wrote:
Seems like a bunch of churn. Are the benefits really big enough?

On Thu, Oct 20, 2022 at 10:19 PM 'Andrew Grieve' via python <pyt...@chromium.org> wrote:
Google's just released a fork of Black, which looks like it would work well for us:

I've filed https://bugs.chromium.org/p/chromium/issues/detail?id=1377174 to look at switching to it in case anyone wants to take a crack at it.

--
You received this message because you are subscribed to the Google Groups "python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python+un...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/python/CABiQX1XvJqZDVC2Qh7z-qyeD22SAGxvNS9G48XO02_51S1LF2w%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python+un...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python+un...@chromium.org.
Reply all
Reply to author
Forward
0 new messages