[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Run formatting tools
From: |
Jonas Hahnfeld |
Subject: |
Re: Run formatting tools |
Date: |
Fri, 25 Sep 2020 16:39:35 +0200 |
User-agent: |
Evolution 3.36.5 |
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/translations-status.py: 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.
> > 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(-)
> https://github.com/psf/black#testimonials
> 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.
Jonas
signature.asc
Description: This is a digitally signed message part
- Run formatting tools, Jonas Hahnfeld, 2020/09/25
- Re: Run formatting tools, Werner LEMBERG, 2020/09/25
- Re: Run formatting tools, Jonas Hahnfeld, 2020/09/25
- Re: Run formatting tools, Han-Wen Nienhuys, 2020/09/25
- Re: Run formatting tools, Jean Abou Samra, 2020/09/25
- Re: Run formatting tools, Jonas Hahnfeld, 2020/09/25
- Re: Run formatting tools, Jean Abou Samra, 2020/09/25
- Re: Run formatting tools,
Jonas Hahnfeld <=
- Re: Run formatting tools, Jean Abou Samra, 2020/09/25
- Re: Run formatting tools, Jonas Hahnfeld, 2020/09/26
- Re: Run formatting tools, Jean Abou Samra, 2020/09/27