[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run formatting tools

From: Jean Abou Samra
Subject: Re: Run formatting tools
Date: Fri, 25 Sep 2020 21:14:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Le 25/09/2020 à 16:39, Jonas Hahnfeld a écrit :

Am Freitag, den 25.09.2020, 16:01 +0200 schrieb Jean Abou Samra:
Le 25/09/2020 à 15:48, Jonas Hahnfeld a écrit :
Anyway, running black on all Python files gives the following error:

     error: cannot format 
/code/LilyPond/src/scripts/auxiliar/ INTERNAL ERROR: 
Black produced different code on the second pass of the formatter.
  I can't reproduce this. What is your version of Black? (Mine is 19.3b0.) What 
line length did you use?

The latest, 20.8b1. Happens with both the default and -l 78.

Seems to be a known, recently introduced bug in Black.It's easy
to work around it using --fast.

Also, it seems to change every occurrence of single quotes to double
quotes unless there are already double quotes. My impression is that
single quotes are used more widespread, and the diff is massive at
56 files changed, 10819 insertions(+), 7704 deletions(-)
Dusty Phillips, writer:

Black is opinionated so you don't have to be.

That's both the advantage and the drawback.

Personally I don't find the diff to be a huge problem
since the autopep8 reformatting already modified the blame.
If it changes around about every quoted string, things can go wrong
very quickly because of the weird escaping rules. We had a similar
issue with the import reordering and I personally don't want to track
down such issue once more.

To be clear, I was not asking you to take any action.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]