Black
The uncompromising Python code formatter — produces consistent output with no configuration debates, adopted as the de facto standard by most major projects
Visit Black →Black formats Python code to a single, consistent style automatically — quote style, line length, whitespace, and wrapping — with almost no configuration options beyond target line length. That’s a deliberate design choice: it removes formatting from the list of things a team spends time debating.
Most projects run it as a pre-commit hook or a CI check rather than trusting manual runs, since the entire point is that nobody has to think about formatting once it’s in place. See what Black actually does for a closer look, or how it compares to Ruff, autopep8, and yapf if you’re choosing between formatters.