4 ms·
+1 ...which is why I wish Black allowed more configuration. A team can often agree on a set of styles. Every team on the Python planet agreeing... now that's m
by declnz 5y ago
+1
...which is why I wish Black allowed more configuration. A team can often agree on a set of styles. Every team on the Python planet agreeing... now that's much harder
- heavenlyblue 5y ago> A team can often agree on a set of styles. What for? Just to be clear even Django itself isn't obviously using a configuration, what makes your team so special they need this?
- harikb 5y ago> A team can often agree this usually just means new team members are stuck respecting the wishes of the old-timers
- david422 5y agoYea, but in this case the old timers have chosen Black so what's the difference?
- belval 5y agoI disagree on that though. By sticking to vanilla Black (no pun intended) you ensure that people joining your time will probably already be familiar with the style, you prevent strongly opinionated employees from pushing for changes in the linter config. Black is opinionated, so it skips the debate entirely. We just use Black, not black with 120 characters lines, just Black. To each their own I guess, but to me it just seems like pandora's box. Once you show that you are open to changes in the linting configuration, it makes the rules mutable and pretty much guarantees that at some point someone will say "how about we just change this one parameter in the linter", which will probably be agreed by the rest of the team, not because they actually agree but because they don't want to argue.
- spc476 5y agoYes, it's opinionated, but who's opinion got carved into stone?
- frosted-flakes 5y agoDoes it matter?
- spc476 5y agoWell, someone convinced the Python community that their coding standard should be the one coding standard.
- belval 5y agoThat does not really matter as long as the default are somewhat sensible. As far as I can tell Black's are. gofmt is also opiniated. Someone somewhere picked the defaults and maybe I disagree with those defaults, but in the grand scheme of things, all go code is more approachable because it all looks the same. That to me, is worth a lot more than having my favorite format be the one on top. EDIT: If you want to discuss the actual merits of Black, you can read their style page that actually explains every choice they made: https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html https://black.readthedocs.io/en/stable/the_black_code_style/...
- throwaway894345 5y agoMore configuration would allow for more fragmentation...
- pinkman68419 5y agoThe etymology of black is "any color you like, as long as it's black" [0]. The whole point is that it's _not_ configurable. [0] https://github.com/psf/black#readme https://github.com/psf/black#readme
- dumdumdumdum 5y agohttps://github.com/google/yapf https://github.com/google/yapf