Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My understanding of black is that it solves bikeshedding by making everyone a little unhappy.

For aligned column readability and other scenarios, # fmt: off and # fmt: on become crucial. The problem is that like # type: ignore, those start spreading if you're not careful.



My only complaint with black is that it only splits long definitions into per-line if they exceed a limit. That’s probably configurable, now that I write it down.

Other than that, I actually quite like its formatting choices.


Line length is definitely configurable. All it takes is adding the following on pyproject.toml[1]:

  [tool.black]
  line-length = 100
Aside from matrix-like or column aligned data, the only truly awful thing I've encountered has been broken f-string handling[2].

[1]: Example from https://github.com/pythonarcade/arcade/blob/808e1dafcf1da30f...

[2]: https://github.com/psf/black/issues/4389


yeah; unless your coworkers are hindu, you can solve 'bikeshedding' about which restaurant to go to by going to mcdonald's, too




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: