Black removes style choices by keeping options scarce
Black rewrites an entire Python file according to one style and deliberately offers few ways to change that style. The bargain is plain: developers stop spending review time on wrapping, quotes, and spacing, while Black gets the final say. A team that already agrees on that bargain can add one command to an editor, pre-commit hook, or CI job and expect the same result in each place.
The current package requires Python 3.10 or newer to run. It can read defaults such as line length, target versions, and include or exclude patterns from pyproject.toml. Notebook formatting comes through the jupyter extra, while standalone executables are available for users who do not want to install Python. There are enough controls for repository boundaries and language targets, but the project does not aim to reproduce a custom style guide.
Default mode checks the formatted file's AST
Black parses code before and after formatting and checks that the resulting abstract syntax trees are effectively equivalent. This safety step slows the formatter, and --fast disables it. Keeping the check enabled is a sensible default for CI and bulk migrations because the formatter is editing executable source. The option exists for cases where the caller has a separate reason to prefer speed.
That safety check has practical limits. It compares Python structure, so it cannot decide whether a moved comment has changed a tool directive or whether every external parser understands the result. Release 26.5.1 fixed comment handling around # fmt: skip after a lost # type: ignore could trigger an AST-equivalence failure. A formatter with a stable style still needs regression tests for comments, pragmas, and new Python syntax.
What happened when we ran it
Our sandbox installed Black in 26 seconds, pulling 40 packages and using 39 MB on disk. We tested commit acd6198 with 3 CPUs, 8 GB of RAM, Python 3.12 on Debian, no secrets, and an unprivileged container. Pip-audit found 0 known vulnerabilities in the installed dependencies. The checkout itself contained 482 files, about 134,051 lines of source, and occupied 6.1 MB.
The build command exited 1 after 3 seconds. The supplied end of its log contains SyntaxWarnings from tests/data/cases/preview_redundant_generator_parentheses.py, where generator objects are indexed or called on purpose as formatter input. That tail does not include the final build error, so those warnings are all we can report. Calling them the cause would go beyond the evidence.
Pytest exited 1 after 59 seconds. It reported 445 passed, 3 failed, 3 skipped, and 1 collection or setup error out of 449, plus 8 passing subtests. The failed assertions involved __pycache__ or compiled paths turning up in fixture discovery. Collection of tests/test_blackd.py raised a direct instruction to install Black with the d extra. The base install therefore did not reproduce a green contributor run.
The base formatter needs no service or credential
For normal use, installation is pip install black, followed by black and a file or directory. No API key, account, server, or database is involved. Black writes files in place, while check and diff modes let CI report changes without applying them. The project also ships a Dockerfile and has a tests directory, which makes its intended development surfaces easier to find than in many command-line projects.
Optional paths change the dependency picture. Jupyter notebooks need one extra, and the daemon path needs another. Our 40-package environment was enough to import and exercise most of the suite, yet it was not enough to collect the daemon tests. A contributor should install the documented development set rather than treating the smallest user install as a complete test environment.
Style stability reduces churn without freezing output forever
Black describes its current style as stable and says large formatting changes should be uncommon. Release 26.5.1, published May 18, 2026, focused on annotated assignments, comment preservation, executable version metadata, and Neovim documentation. Those are narrow maintenance items rather than a redesign of everyday output.
Development is still active. GitHub recorded a last push on September 16, 2026, 41,843 stars, and 306 open issues and pull requests combined. Issue 5402 documents an unreleased regression on the main branch involving # fmt: skip on an opening bracket, while several September pull requests target the same parsing area. The release remains unaffected according to that report, which is exactly why teams should pin a released version instead of installing the repository head.
Ruff combines formatting with more checks
Black does one job, and that focus remains useful. Ruff is the obvious comparison for teams that also want lint rules and import sorting from one binary. YAPF gives maintainers more formatting controls. autopep8 is closer to a targeted repair tool for pycodestyle findings. None is a drop-in philosophical match because Black's main feature is the refusal to negotiate every style decision.
The 26-second install and 39 MB footprint make Black cheap to trial on a real branch. Run it once, inspect the diff, and ask whether the team prefers that output to recurring formatting review. If the answer is yes, pin the release, install the extras required by your workflow, and enforce the same command locally and in CI. The value comes from everyone accepting the result.

