HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
psf
black
Python2018–2026
psf / black

black

The uncompromising Python code formatter

79Distinct people
83Mentions
3Explicit recommenders
42.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The uncompromising Python code formatter

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

I don't see the black python formatter[0] mentioned. I use it for all of my projects and I love it as I prefer not to have a linter distract me while I type. You can see a…

reportgunner used a recommendation phrase. 3 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year83 dated mentions

Observed mentions: 2018-03-14 21:57:08 UTC to 2026-09-30 22:50:00 UTC.

0510152018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 11 mentions; 5 submissions, 6 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 16 mentions; 2 submissions, 14 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 14 mentions; 3 submissions, 11 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 16 mentions; 3 submissions, 13 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 7 mentions; 1 submissions, 6 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC1156
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC16214
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC909
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC14311
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC16313
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC303
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC716
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC202
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC514

What Hacker News says

83 sources
Coming from a Meta background (not speaking on behalf of Meta): "package/dependency management" - Everything is checked into a monorepo, and built with [Buck2](https://buck2.build/). There's tooling to import/update packages, but no need to reinvent pip or other package managers. Btw, Buck2 is pretty awesome and supports a ton of languages beyond python, but hasn't gotten a ton of traction outside of Meta. "linting, formatting" - [Black](https://github.com/psf/black) and other public ecosystem tooling is great, no need to develop internally. "why is type checking the exception" - Don't know about Astral, but for Meta / Google, most everyone else doesn't design for the scale of their monorepos. Meta moved from SVN to Git to Mercurial, then forked Mercurial into [Sapling](https://sapling-scm.com/) because simple operations were too slow for
Read the rest
the number of files in their repo, and how frequently they receive diffs. There are obvious safety benefits to type checking, but with how much Python code Meta has, mypy is not an option - it would take far too much time / memory to provide any value.
In Pyrefly vs. Ty: Comparing Python's two new Rust-based type checkers
> I appreciate that Black annoyed everyone on our team about the same amount but in different ways. If it did affect people equally, it would be great. Unfortunately, spaces for indentation is an accessibility issue and the Black maintainers are hostile to making this configurable. Normally I am in agreement about minimising configurability, but this isn’t a matter of taste, it is making the Python ecosystem more difficult for some disabled people to participate in. https://github.com/psf/black/issues/2798 Fortunately, Ruff makes this configurable, so you don’t have to choose between autoformatting and accessibility any more.
In Ruff: Python linter and code formatter written in Rust
Never heard of it so looked it up: https://github.com/psf/black > Black is the uncompromising Python code formatter. By using it, you agree to cede control over minutiae of hand-formatting. In return, Black gives you speed, determinism, and freedom from pycodestyle nagging about formatting. You will save time and mental energy for more important matters.
In Python with Braces
We do actually support direct installation of Git and direct URL dependencies. Like, you can do run `uv pip install` with: ``` black @ git+https://github.com/psf/black ``` We also support editable installs for local directories, like you mentioned: ``` black @ ../black ``` The thing we don't support is using _editable_ installs for Git and direct URL dependencies, like: ``` -e git+https://github.com/psf/black ``` In my experience, these are really rare, and we didn't see a reason to support them.
In Uv: Python packaging in Rust
It does, you'd just have to install a python plugin that registers the autocommand-- or leave out the plugin and register the autocommand yourself. The (n)vim/emacs communities aren't fond of integrating the hot new thing for each language directly into the editor-- I think this is a lesson that comes from being 50 years old! As for whether it would be buggy, I'd doubt it? Unless Black's principle of operation is different from most formatters, it should just write the formatted contents to the file, right? The autocommand you'd use would just run Black on your current file on each save. So where % is Vim's symbol for the name of the currently open file, :silent! suppresses stdout/stderr from the formatter, and :! runs a command: autocmd BufWritePost *.py silent! !<format_cmd> % (Don't quote me on that, but it should be essentially correc
Read the rest
t. I'm not at a computer right now.) Actually, it looks like you can install an (n)vim plugin from the official Black repo here: https://github.com/psf/black/blob/main/plugin/black.vim And then the autocmd would be autocmd BufWritePost *.py silent! Black This stuff is documented here: https://black.readthedocs.io/en/stable/integrations/editors.... Anyway, I think it's actually a really cool effect of doing this that you realize a lot of the scaffolding underneath most editors _isn't_ that complicated! It's totally understandable :)
In LazyVim

Showing the 15 most recent of 83 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.