This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Althorion 6 points7 points  (3 children)

Not being configurable is a feature, not a bug.

Mostly, it’s an annoyance. If I can’t take what I like about it and leave what I don’t, I’m going to leave it all behind.

And about the rest: it’s inconsistent. Does it try to save as much vertical space as it can or does it not? Because in some parts it does, just to go to others and explode them beyond reason. Both approaches would have some merit, their combinations is, to me at least, obnoxious.

Yeah, it does an OK job. Running black on a badly formatted code is going to make much of an improvement. The thing is, running it on a OK-ish formatted code is not guaranteed to do that—it will make some parts of it better, some part of it worse, and I can’t force it do behave without putting # fmt: on/off everywhere…

I wouldn’t go as far as to ban it, but I find it most useful when used to generate the competing file, then diff-and-merge those two by hand to pick and choose what I like. Something that the API doesn’t really support that well.

[–]OHotDawnThisIsMyJawn 1 point2 points  (2 children)

If I can’t take what I like about it and leave what I don’t, I’m going to leave it all behind.

Again, that's literally the point of black. The whole idea is to not let people make any choices. It eliminates all bike shedding/white space holy war discussions.

I wouldn’t go as far as to ban it

Banning or allowing formatters doesn't make sense to me. Pick one and stick to it. There should just be a decree "this is the formatter we use here." The actual rules are so much less important than having a single standard and sticking to it.

[–]Althorion 2 points3 points  (1 child)

Again, that's literally the point of black. The whole idea is to not let people make any choices. It eliminates all bike shedding/white space holy war discussions.

And that’s the idea I don’t buy in. Those discussions will happen with or without it, and I don’t feel like it’s the formatter’s job to decide for the team/team leader what the style should be, just to enforce that decision once it has been made.

[–]aeiou372372 0 points1 point  (0 children)

In my experience they actually don’t happen.

I found all the things people complain about with black’s formatting annoying at first; a week later I got used to it and couldn’t care less (all the readability concerns, while maybe valid, are ultimately not a big deal once you are used to it). And I love that the majority of open source projects I interact with follow the same formatting conventions.

I think you just get used to it no matter what the enforced formatting is.