# psf/black

The uncompromising Python code formatter

Repository: https://github.com/psf/black
Canonical: https://ross.abutalabs.com/products/black
Homepage: https://black.readthedocs.io/en/stable/
Language: Python
License: MIT
License Family: permissive
Topics: python, code, formatter, codeformatter, gofmt, yapf, autopep8, pre-commit-hook, hacktoberfest
Last push: 2026-08-20T13:01:16+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 72, longevity 100
- inputs: {"age_days": 3094, "days_push": 13, "days_rel": 107, "gap_med": 47, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 41816, forks 2851 (observed 2026-08-28T04:12:08.675541+00:00)

## What it is
Black is an opinionated, deterministic Python code formatter that reformats code to a single consistent style. It runs as a CLI, integrates with editors, pre-commit hooks, and CI, and can also format Jupyter notebooks.

## Use cases
- format python code automatically
- enforce consistent code style across a team
- stop arguing about formatting in code reviews
- add a formatter to pre-commit hooks
- format jupyter notebooks
- reduce diff noise in pull requests

## When to choose
- you want zero-configuration, deterministic formatting for Python
- you want a de facto standard style recognized across projects
- you need editor, CI, and pre-commit integrations

## When to avoid
- you need highly customizable formatting styles
- you are formatting non-Python code

## Facets
- artifact type: cli-tool
- maturity: stable
- function: formatter, developer-tools, cli
- domain: developer-tools, programming-languages, testing
- platform: python, cli, cross-platform
- tags: code-style, auto-formatting, pre-commit-hook, pep8, jupyter-notebooks, python

## Member repositories
- psf/black (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:12:08.675541+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:22:54.497006+00:00, confidence not recorded.
  - readme: https://github.com/psf/black (fetched 2026-08-28T04:12:08.675541+00:00, sha 2b3b8b08762d)
  - homepage: https://black.readthedocs.io/en/stable/ (fetched 2026-08-29T07:46:16.422970+00:00, sha 457c416b144c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
