News for hackers. Stuff that matters.
Re:Greppability is an underrated code metric by sgarland on Tuesday September 03, 2024 @07:37PM (#41440395)
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.

Re:Greppability is an underrated code metric by pushfoo on Tuesday September 03, 2024 @09:35PM (#41441030)
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