The uncompromising code formatter¶
By using Black, you agree to cede control over minutiae of hand-formatting. In return, Black gives you speed, determinism, and freedom from pycodestyle nagging about formatting. You will save time and mental energy for more important matters.
Black makes code review faster by producing the smallest diffs possible. Blackened code looks the same regardless of the project you’re reading. Formatting becomes transparent after a while and you can focus on the content instead.
Try it out now using the Black Playground.
Dusty Phillips, writer:
Black is opinionated so you don’t have to be.
Hynek Schlawack, creator of attrs, core developer of Twisted and CPython:
An auto-formatter that doesn’t suck is all I want for Xmas!
Carl Meyer, Django core developer:
At least the name is good.
This vastly improves the formatting of our code. Thanks a ton!
- Installation and usage
- The Black code style
- Black compatible configurations
- Editor integration
- Version control integration
- GitHub Actions
- Ignoring unmodified files
- Contributing to Black
- Show your style
- Change Log
- Developer reference