Back to directory

Black

An opinionated Python code formatter that reformats files in place with minimal configuration, producing consistent formatting across projects.

Black

Black is an opinionated Python code formatter that reformats entire files in place with deliberately limited configuration options. By adopting Black, a project cedes control over the fine details of hand-formatting in exchange for deterministic formatting that looks the same across any codebase using it, which the project argues makes code review faster by producing smaller diffs.

Black is installed with pip, requires Python 3.10 or later, and can format Jupyter notebooks when installed with the jupyter extra. Standalone executables built with PyInstaller are also published on the release page for people who want to run it without a Python installation.

As a safety check, Black verifies that the reformatted code still parses to an equivalent abstract syntax tree as the original, unless the user passes a --fast flag to skip that check.

More in Code quality

See all 94
  • Critic

    critic.run

    A code-change viewer, backed by Y Combinator, built for reviewing work written by coding agents, presenting a plain-language narrative of each change alongside the diff and a running conversation with the agent.

  • GitIntel

    hoangsonww.github.io

    An MCP server that computes git repository analytics such as hotspots, churn, temporal coupling, knowledge maps and risk scoring entirely from local commit history, for AI coding agents like Claude Code and Codex.

  • Axint

    axint.ai

    A verification layer for AI coding agents working on Apple projects: it runs real Xcode builds and tests against the Swift an agent wrote, reconciles static analysis findings against that evidence, and returns a signed proof with the exact repairs still needed.