psf/black
View on GitHub ↗ ★ 42,094 Python
The uncompromising Python code formatter
84 mentions on Hacker News by 80 people: 15 stories, 69 comments · first 2018-03-14 · latest 2026-09-30
20082026
-
▲ 3
Configurable Indent Levels?story by jerlendds · 2026-09-30 · 0 comments
-
Black for Python https://github.com/psf/black
comment by mholm · 2026-08-11 · in Go is an ideal language for AI-assisted software engineering -
https://github.com/psf/black/tree/main/profiling
comment by mezyt · 2026-06-19 · in Fable Converted Pylint to Rust -
The 2000x number is based on a pathological directory in black's repo https://github.com/psf/black/tree/main/profiling which make duplicate-code really slow and a fix was done in pylint 4.1.0 according to pylint's maintainer.
comment by mezyt · 2026-06-19 · in Fable Converted Pylint to Rust -
Use black as format on save and you will never have a problem with that. https://github.com/psf/black
comment by tweakimp · 2026-05-08 · in Mojo 1.0 Beta -
…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" -…
comment by ckwalsh · 2025-05-27 · in Pyrefly vs. Ty: Comparing Python's two new Rust-based type checkers -
…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…
comment by JimDabell · 2025-01-21 · in Ruff: Python linter and code formatter written in Rust -
https://github.com/psf/black
comment by indigodaddy · 2024-10-11 · in Black – The uncompromising Python code formatter -
…handling[2]. [1]: Example from https://github.com/pythonarcade/arcade/blob/808e1dafcf1da30f... [2]: https://github.com/psf/black/issues/4389
comment by pushfoo · 2024-09-04 · in Greppability is an underrated code metric -
Yes : https://github.com/psf/black/ is 502
comment by abhishekjha · 2024-08-14 · in GitHub was down -
▲ 3
Black: The uncompromising Python code formatterstory by ulrischa · 2024-07-21 · 0 comments
-
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,…
comment by emmelaich · 2024-07-08 · in Python with Braces -
IME even better than linters is something like `go fmt` (I work mainly in Python and use https://github.com/psf/black ). Rather than forcing you to manually jimmy the code to satisfy the robot, just let the robot make it look the way it…
comment by ElevenLathe · 2024-07-03 · in Code reviews do find bugs -
…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…
comment by charliermarsh · 2024-02-16 · in Uv: Python packaging in Rust -
Perfect, that worked, thank you! I thought this could be solved by changing the directory to src/ and then executing that command, but this didn't work. This also seems to be an issue with the web app, e.g. the repository for the formatter…
comment by SushiHippie · 2024-02-03 · in Show HN: Visualize the entropy of a codebase with a 3D force-directed graph -
Python formatter Black: https://github.com/psf/black By using Black, 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…
comment by TheCleric · 2023-07-08 · in ProtonMail Rewrites Your Emails -
…I have a plugin for Neovim that adds indentation-based motions. The implementation is trivial. [6] https://github.com/psf/black [7] https://codegolf.stackexchange.com/questions/57257/radiation...
comment by xigoi · 2023-05-23 · in Show HN: Ki Programming Language -
…python autoformatter would probably 2x the lines of code. [0] https://peps.python.org/pep-0008/ [1] https://github.com/psf/black
comment by dedoussis · 2022-11-04 · in Tinygrad: A simple and powerful neural network framework -
…adding "alpha" quality software as a dependency to your supposedly production ready tool. [1] https://github.com/psf/black/issues/2846
comment by intrepidhero · 2022-09-27 · in Making Python fast – Adventures with mypyc -
> We still don't have format selection And you never will. From 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…
comment by LittlePeter · 2022-08-31 · in Ruff – a fast Python Linter written in Rust -
Black is a tool that can reformat Python code. It's remarkable for it's lack of configuration. https://github.com/psf/black
comment by rcv · 2022-02-08 · in Django: Reformatted code with Black -
▲ 2
Black – The uncompromising Python code formatterstory by punnerud · 2022-02-08 · 0 comments
-
…color you like, as long as it's black" [0]. The whole point is that it's _not_ configurable. [0] https://github.com/psf/black#readme
comment by pinkman68419 · 2022-02-08 · in Django: Reformatted code with Black -
…are not executable code, and should be allowed more flexibility when it comes to formatting. [0] https://github.com/psf/black/issues/1779 [1] https://www.python.org/dev/peps/pep-0257/
comment by BerislavLopac · 2022-01-30 · in Black, the uncompromising Python code formatter, is stable -
…on this front where the maintainer team is at least more receptive to reopening this conversation: https://github.com/psf/black/issues/2798
comment by sciyoshi · 2022-01-30 · in Black, the uncompromising Python code formatter, is stable -
…a while. There was only one change that we had to make to Black to get it working on our codebase - https://github.com/psf/black/commit/024c9cab55da7bd3236fd887... Glad to see it's now stable.
comment by ublaze · 2022-01-29 · in Black, the uncompromising Python code formatter, is stable -
This was decided very early in the project, the discussion can be read here: https://github.com/psf/black/issues/51
comment by ambivalence · 2022-01-29 · in Black, the uncompromising Python code formatter, is stable -
▲ 1
Release 22.1.0 · Psf/Blackstory by pauloxnet · 2022-01-29 · 0 comments
-
▲ 4
Python's Black is finally non-beta softwarestory by collinmanderson · 2022-01-29 · 1 comment
-
…2] No such file or directory: '/root/.cache/black/21.12b0/tmp80hsbuff I believe this is the issue: https://github.com/psf/black/issues/1143 Not entirely clear what the reasons are for adding the Black dependency to IPython....
comment by danjac · 2022-01-12 · in IPython 8.0 -
…be automated, if not with tooling that actually rearranges the code in that way (e.g. [black]( https://github.com/psf/black ) for Python) then at least including well tuned linter rules. We use black, my own zimports tool for sorting…
comment by that_guy_iain · 2022-01-04 · in No code reviews by default -
…be automated, if not with tooling that actually rearranges the code in that way (e.g. [black]( https://github.com/psf/black ) for Python) then at least including well tuned linter rules. We use black, my own zimports tool for sorting…
comment by zzzeek · 2022-01-04 · in No code reviews by default -
https://github.com/psf/black
comment by amhoab · 2021-12-18 · in Ask HN: I'm tired of intense code review cycles -
The python formatter, I guess. https://github.com/psf/black
comment by xmcqdpt2 · 2021-12-18 · in Ask HN: I'm tired of intense code review cycles -
What a relief to click on this and see it isn't a screed against https://github.com/psf/black
comment by foobarbecue · 2021-12-03 · in Never Use Black (2012) -
…is now having to write an “end” keyword all over your code really a tradeoff worth making? [1] https://github.com/psf/black
comment by leadingthenet · 2021-12-01 · in Julia 1.7 Highlights -
▲ 1
Support Python 3.10 pattern matching syntax · Issue #2242 · psf/blackstory by gilad · 2021-11-13 · 0 comments
-
…the "business domain" of Python code than Java/C#. [0]: https://github.com/asottile/pyupgrade [1]: https://github.com/psf/black [2]: https://gitlab.com/pycqa/flake8
comment by babayega2 · 2021-10-15 · in Ask HN: Did somebody have success with the migration of Python 2.7 to Java/C#? -
…of developers use a formatter like black [0] nowadays so that will have less and less impact. [0]: https://github.com/psf/black
comment by Spixel_ · 2021-10-02 · in Python Coding Style Compliance on Stack Overflow -
▲ 3
Black violates pep8 recommendation with long argument list (2019)story by hsfzxjy · 2021-10-02 · 0 comments
-
…distract me while I type. You can see a demo[1] without installing it to check how it works. [0] https://github.com/psf/black [1] https://black.vercel.app/
comment by reportgunner · 2021-08-02 · in The State of Python in 2021 -
Prettier works for JS. A similar Python tool is Black: https://github.com/psf/black > Black makes code review faster by producing the smallest diffs possible.
comment by danuker · 2021-07-08 · in Difftastic: Syntax-aware structured diff tool -
Enforce consistent formatting, e.g. with black ( https://github.com/psf/black ) this gets formatted to [0xF or x in (1, 2, 3)].
comment by tsbinz · 2021-04-13 · in In Python, `[0xfor x in (1, 2, 3)]` returns `[15]` -
…literally the color black is coming under attack - for example the python formatter "black"[0] [0] https://github.com/psf/black/issues/1830
comment by umvi · 2021-02-12 · in Stanford archive to highlight Black histories of Silicon Valley -
▲ 1
Black, please respect the established Python coding stylestory by greatgib · 2021-01-26 · 0 comments
-
…this[0]. There are flags to skip string formatting, but is frowned upon at my organization. [0] https://github.com/psf/black/blob/master/docs/the_black_code...
comment by psalminen · 2021-01-20 · in Python 3's F-Strings: An Improved String Formatting Syntax -
…JetBrains refactoring for static languages (c#, Java, kotlin) does seem significantly superior. [1] https://github.com/psf/black
comment by wokwokwok · 2020-12-19 · in Jetbrains founders turn billionaires without VC help -
…tools will only lead to alert fatigue because people will write it off as an update to to tool. [0] https://github.com/psf/black
comment by aequitas · 2020-11-06 · in Show HN: A Django code review bot for GitHub pull requests