The uncompromising Python code formatter
Black is an uncompromising Python code formatter that automatically reformats entire files according to a strict, opinionated style based on PEP 8. It is built in Python and requires Python 3.10 or later to run, with optional support for formatting Jupyter Notebooks. The tool's primary goal is to eliminate time spent on formatting decisions by producing deterministic, consistent output across projects, while also enabling faster code reviews through minimal diffs. Black is maintained by the Python Software Foundation and is widely adopted by major organizations including Dropbox, Mozilla, Lyft, and Tesla, as well as numerous open-source projects like Django, pytest, and pandas.