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 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 7:24:48 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

9 sources
I’m not gonna deny it’s frustrating to see quality of life stuff like “don’t refactor stuff from packages!” unaddressed year after year. ...but I think it is a tricky problem. For example Black[1] is a very carefully crafted project that does an excellent job, but it fails at refactoring files just to apply lints with “inconsistent code generated” on some projects and files; and that’s just apply limiting rules. ...but, I for whatever reason, the JetBrains refactoring for static languages (c#, Java, kotlin) does seem significantly superior. [1] https://github.com/psf/black
In Jetbrains founders turn billionaires without VC help
This looks interesting! I think the approach where a typed subset of Python is used to compile a fast extension module is the way forward for Python. This would leave us with a slow but dynamic high-level-variant (CPython) and typed lower-level-variant (EPython, mypyc & co) to compile performant extension modules, which you can easily import into your CPython code. The most prominent of such projects I know of is mypyc [0], which is already used to improve performance for mypy itself and the black [1] code formatter. I think it would be interesting to see how EPython compares to mypyc. [0] https://github.com/python/mypy/tree/master/mypyc [1] https://github.com/psf/black/pull/1009
In Attempts to make Python fast
Interestingly, the question whether this particular choice of code formatting in black adheres to pep8 is still an ongoing discussion[1][2][3][4]. Guido, for example, thinks that black's choice is not compatible with pep8 and I think he described the situation quite well on Python's Discourse[5]: > So the root of this argument is that Black produces code that isn’t always in compliance with PEP 8. I say this is fine – if you use Black you don’t need PEP 8 to tell you how to format your code. (PEP 8 is still useful for other things like naming things.) > Black optimizes for a different goal than PEP 8; PEP 8 optimizes for readability while Black sometimes compromises readability in order to satisfy other goals such as minimizing lines changed as code evolves. > I don’t want to compromise PEP 8 though. [1]: https://github.com/psf/black/issu
Read the rest
In Python programming is drowning in red tape
Hard forking a project to make use of the hard work the maintainers put in to it, then writing a post doing nothing but insulting those maintainer's decisions / preferences, is not a good look. Neither is throwing temper tantrums in issue threads: https://github.com/psf/black/issues/1178#issuecomment-565383... Also if this developer wasn't so obsessed with bikeshedding, they could just edit the one bit of formatting code and republish. That way they could even rebase off of upstream if they wanted. Personally, I much prefer black's indentation scheme. I also like spending as little time as possible agonizing over minutia like this.
In Python programming is drowning in red tape

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.