psf/black

Description: The uncompromising Python code formatter

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 3 hours ago
Added to GitGenius on June 24th, 2026
Created on March 14th, 2018
Open Issues & Pull Requests: 301 (+0)
Number of forks: 2,816
Total Stargazers: 41,733 (+0)
Total Subscribers: 225 (+0)

Issue Activity (beta)

Open issues: 68
New in 7 days: 1
Closed in 7 days: 1
Avg open age: 1,132 days
Stale 30+ days: 60
Stale 90+ days: 54

Recent activity

Opened in 7 days: 1
Closed in 7 days: 1
Comments in 7 days: 3
Events in 7 days: 7

Top labels

  • T: bug (194)
  • T: style (68)
  • T: enhancement (58)
  • T: documentation (25)
  • F: strings (23)
  • C: preview style (19)
  • C: crash (18)
  • F: fmtskip (17)

Repository Insights (GitGenius)

Median issue/PR response: N/A
Mean response time: 2.2 days
90th percentile: 0.7 hours
Tracked items: 404

Most active contributors

Detailed Description

Black is an uncompromising Python code formatter maintained by the Python Software Foundation that automatically reformats entire Python files according to a strict, opinionated style. The tool eliminates debates over formatting minutiae by enforcing a single consistent style across codebases, making code review faster through minimal diffs and allowing developers to focus on code content rather than formatting decisions. Black requires Python 3.10 or higher to run and can be installed via pip, with optional support for formatting Jupyter Notebooks through an additional dependency.

The formatter implements a PEP 8 compliant style with deliberately limited configuration options, reflecting its philosophy that sensible defaults should suffice for most projects. Black reads project-specific settings from pyproject.toml files for custom include and exclude patterns, but the tool is designed to work effectively without any configuration. As a safety measure, Black verifies that reformatted code produces a valid Abstract Syntax Tree equivalent to the original, though users can bypass this check with a fast mode flag. The tool has evolved from an absolutist approach in early versions to incorporate pragmatic exceptions for edge cases as it matured and gained widespread adoption.

According to GitGenius activity tracking, Black maintains a median issue and pull request response latency of zero hours with a mean of 54.2 hours across 402 tracked items, indicating active and responsive maintenance. The most frequently addressed issue categories are bugs with 193 tracked events, style-related issues with 68 events, and enhancement requests with 57 events. JelleZijlstra leads contributor activity with 432 tracked events, followed by cobaltt7 with 283 events and ichard26 with 158 events. The repository shares overlapping contributors with github/gh-aw, solo-io/gloo, and microsoft/vscode, suggesting cross-project collaboration within the Python development ecosystem.

Black has achieved significant adoption across the Python community, with notable open-source projects including pytest, Django, SQLAlchemy, pandas, Pillow, and Home Assistant relying on it for code style enforcement. Major organizations including Dropbox, Lyft, Mozilla, and Tesla use Black across their codebases. The tool's impact on developer productivity is reflected in testimonials from prominent Python developers, with SQLAlchemy creator Mike Bayer describing it as providing the largest productivity increase of any tool in his programming career.

The repository is written in Python and published under an MIT license. Black maintains comprehensive test coverage with efficient parallel testing and continuous integration infrastructure. The project welcomes contributions through its documented contribution guidelines and maintains an active Discord community for developer discussion. The codebase has grown to include extensive documentation on ReadTheDocs covering usage, configuration, the Black code style specification, stability policies, and pragmatic exceptions to formatting rules. Black's stability policy ensures that stylistic changes are primarily responses to bug reports and support for new Python syntax rather than arbitrary reformatting changes, providing confidence to projects that have adopted the tool.

black
by
psfpsf/black

Repository Details

Fetching additional details & charts...