black - Man Page

The uncompromising code formatter.

Examples (TL;DR)


black [Options] [SRC]...


The uncompromising code formatter.


-l, --line-length INTEGER

How many character per line to allow.  [default: 88]


Don't write the files back, just return the status.  Return code 0 means nothing would change.  Return code 1 means some files would be reformatted.  Return code 123 means there was an internal error.


Don't write the files back, just output a diff for each file on stdout.

--fast / --safe

If --fast given, skip temporary sanity checks. [default: --safe]

-q, --quiet

Don't emit non-error messages to stderr. Errors are still emitted, silence those with 2>/dev/null.


Show the version and exit.


04-May-2018 black Manual