Hacker GitHub

← All repos

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

Mentions per year 84 mentions · busiest year 2019 (16)
20082026
  1. ▲ 3
    Configurable Indent Levels?
    story by jerlendds · 2026-09-30 · 0 comments
  2. Black for Python https://github.com/psf/black
  3. https://github.com/psf/black/tree/main/profiling
    comment by mezyt · 2026-06-19 · in Fable Converted Pylint to Rust
  4. 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
  5. 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
  6. …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" -…
  7. …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…
  8. https://github.com/psf/black
  9. …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
  10. Yes : https://github.com/psf/black/ is 502
    comment by abhishekjha · 2024-08-14 · in GitHub was down
  11. ▲ 3
    Black: The uncompromising Python code formatter
    story by ulrischa · 2024-07-21 · 0 comments
  12. 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
  13. 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
  14. …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
  15. 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…
  16. …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…
    comment by _7tgr · 2023-07-17 · in LazyVim
  17. 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
  18. …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
  19. …python autoformatter would probably 2x the lines of code. [0] https://peps.python.org/pep-0008/ [1] https://github.com/psf/black
  20. …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
  21. > 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
  22. This is why the good lord gave us: https://github.com/psf/black Import line is actually improved with this commit. LGTM, ship it. We now return to your regularly scheduled bikeshedding.
    comment by recuter · 2022-04-04 · in Tinygrad
  23. 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
  24. ▲ 2
    Black – The uncompromising Python code formatter
    story by punnerud · 2022-02-08 · 0 comments
  25. …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
  26. …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/
  27. …on this front where the maintainer team is at least more receptive to reopening this conversation: https://github.com/psf/black/issues/2798
  28. …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.
  29. This was decided very early in the project, the discussion can be read here: https://github.com/psf/black/issues/51
  30. ▲ 1
    Release 22.1.0 · Psf/Black
    story by pauloxnet · 2022-01-29 · 0 comments
  31. ▲ 4
    Python's Black is finally non-beta software
    story by collinmanderson · 2022-01-29 · 1 comment
  32. …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
  33. …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
  34. …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
  35. https://github.com/psf/black
  36. The python formatter, I guess. https://github.com/psf/black
  37. 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)
  38. …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
  39. ▲ 1
    Support Python 3.10 pattern matching syntax · Issue #2242 · psf/black
    story by gilad · 2021-11-13 · 0 comments
  40. …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
  41. …of developers use a formatter like black [0] nowadays so that will have less and less impact. [0]: https://github.com/psf/black
  42. ▲ 3
    Black violates pep8 recommendation with long argument list (2019)
    story by hsfzxjy · 2021-10-02 · 0 comments
  43. …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
  44. 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.
  45. Enforce consistent formatting, e.g. with black ( https://github.com/psf/black ) this gets formatted to [0xF or x in (1, 2, 3)].
  46. …literally the color black is coming under attack - for example the python formatter "black"[0] [0] https://github.com/psf/black/issues/1830
  47. ▲ 1
    Black, please respect the established Python coding style
    story by greatgib · 2021-01-26 · 0 comments
  48. …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...
  49. …JetBrains refactoring for static languages (c#, Java, kotlin) does seem significantly superior. [1] https://github.com/psf/black
  50. …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