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

what is "Black"? (For hopefully obvious reasons, I couldn't find results with google, lol)



But you're probably better off with Ruff these days: https://docs.astral.sh/ruff/

Similar to black but faster, written in Rust, by the same team who created uv.


So... A: not trivial. And B: not part of the language.

> mean this isn't true, formatting is the most trivial part. And so many languages have an opinionated formatter these days (e.g. Black)

I don't think this is correct


    B: not part of the language.
1) Some would call this a perk.

2) When your tooling around a language works better when it's not actually written in the language... That should tell you something. And yet...


This back-and-forth is a good example of why Go benefits from having a centralized linter. And uv isn't the official Python package manager even though it should be.


I don't get why this is a big issue. This isn't some recurrent decision to be made. It's something a lead decides once and the project follows. That's it. Many companies have style guides anyway (eg Google[1]); the choice of a formatter is much simpler.

[1] https://google.github.io/styleguide/go/


Because at some point you have to interact with some other team or project that made a different decision. And whatever you picked might fall out of favor and lose support. There's already a graveyard of Python type linters, including Google's pytype.

Especially the uv thing. You clone some non-uv git repo that has no pyproject.toml and you don't know what to install. Maybe has requirements.txt but it's partially wrong.


What did you search?

If I do the simplest possible thing that isn't a single word, by highlighting "opinionated formatter these days (e.g. Black)" and clicking search, I get the right result. I also get the right result for black formatter, and I get the right result if I yolo the entire comment as my search.


Ah, it's Python. Python is gross. That explains why I couldn't find it. /shrug




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

Search: