Hi,

On Sunday, April 14, 2019 at 10:22:46 AM UTC+2, Curtis Maloney wrote:
>
> Can such a tool be automated into, say, github in a way that doesn't 
> create extra commit noise? 
>

Probably, but after blacking (is that even a word ;)) the codebase once 
there shouldn't be much commit noise.

I side with those who favour a progressive solution, whereby new code 
> only has the new tool applied. 
>

I think that would make it hard on tools like git-hyper-blame which allow 
one to skip revisions. Also you cannot just run black over changes, the 
minimal unit is one file as far as I am aware. Which would make PR very 
very hard to review because you'd have a bunch of syntax changes next to 
real changes.

In my experience with using black [we use it at work], there are 
> numerous choices (including those demonstrated in this list already) 
> where it can significantly _increase_ the cognitive load in simply 
> parsing the code. 
>

Generally I am okay with the way black formats code. But I have to admit 
that for some very tricky codepaths I tend to turn it off from time to 
time. That does not happen very often though.

As simple as black can make the job of code formatting, I feel I'd 
> rather see a different tool that retained the benefits of "trivial code 
> reformatting", but still allowed us to retain some of Django's existing 
> code formatting rules. 
>

Open to suggestions, did you just offer to write one :)

(An interesting [and defensible] choice, we had a module with a lot of 
> strings wrapped across lines. black opted to push them onto the same 
> line, but NOT to merge them.  This is because in Python prior to 3.7, it 
> would have altered the generated AST - one of the guides black uses) 
>

We can and should fix those occurrences in our codebase then I guess.
 
Cheers,
Florian

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/8a2e84f3-8b1f-45b7-9ae0-4d556e85133a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to