Black – code formatter

Black is the uncompromising Python code formatter. By using it, 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.

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.

Black is a PEP 8 compliant opinionated formatter. Black reformats entire files in place. Style configuration options are deliberately limited and rarely added. It doesn’t take previous formatting into accoun

Black makes code review faster by producing the smallest diffs possible.

This is free and open source software.

Website: github.com/psf/black
Support:
Developer: Łukasz Langa
License: MIT License

Black is written in Python. Learn Python with our recommended free books and free tutorials.


Related Software

Python Code Formatters
RuffExtremely fast Python linter and code formatter
YAPFPython formatter based on clang-format
BlackUncompromising Python code formatter
isortPython utility and library to sort imports
autopep8Formats Python code to conform to the PEP 8 style guide
DarkerApply black reformatting to Python files
PyinkPython code formatter
blueSomewhat less uncompromising code formatter than black
μsortSorts import statements
eradicateRemove commented-out code from Python files

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted