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
-
…from https://github.com/pre-commit/pre-commit-hooks plus https://github.com/asottile/pyupgrade plus https://github.com/psf/black plus maybe the mypy and flake8 hooks. These hooks are also run in a "lint" stage by by tox, which is also run…
comment by mmmrk · 2019-08-27 · in How to set up a perfect Python project -
…Long lines also make it harder to present code neatly in documentation or talk slides." [0] https://github.com/psf/black
comment by chimprich · 2019-08-12 · in Python Is Eating the World -
…the feature that's forcing that behavior. So, again: f-strings have saved me a ton of tedium. [0] https://github.com/python/black
comment by stefco_ · 2019-07-17 · in What's Coming in Python 3.8 -
…reasoning for not including tabs as an option is that "tabs for indentation are the devil". https://github.com/python/black/issues/47
comment by scrollaway · 2019-07-08 · in Nobody talks about the real reason to use Tabs over Spaces -
Python has a code formatter named Black after Ford's quote and is almost uncustomisable. https://github.com/python/black
comment by aitchnyu · 2019-07-03 · in Svelte is the most beautiful web framework I've seen -
…of the open PR to explode collections if there is a trailing comma[0], which feels... wrong. [0] https://github.com/python/black/pull/826
comment by frosted-flakes · 2019-05-17 · in Black – Uncompromising Python code formatter -
…pylint on the same codebase runs into this issue: * https://github.com/PyCQA/pylint/issues/289 * https://github.com/python/black/issues/48
comment by neuronexmachina · 2019-05-17 · in Black – Uncompromising Python code formatter -
…is being addressed [0] in Black and is expected to be resolved before Black becomes stable. [0] https://github.com/python/black/pull/826
comment by di · 2019-05-17 · in Black – Uncompromising Python code formatter -
…id: reorder-python-imports args: [--application-directories=gaia] language_version: python3 - repo: https://github.com/ambv/black rev: stable hooks: - id: black language_version: python3 - repo: local hooks: - id: eslint name: eslint…
comment by andrewljohnson · 2019-05-17 · in Black – Uncompromising Python code formatter -
Black's README explains how to do it: https://github.com/python/black#version-control-integration
comment by devvesa · 2019-05-17 · in Black – Uncompromising Python code formatter -
…and it's easier than setting up and maintaining your own hooks IMO) [0] https://pre-commit.com/ [1] https://github.com/python/black/blob/master/README.md#versio...
comment by guitarbill · 2019-05-17 · in Black – Uncompromising Python code formatter -
It’s been available that way for over a year: https://github.com/python/black/blob/master/plugin/black.vim
comment by lvh · 2019-05-17 · in Black – Uncompromising Python code formatter -
…/ integration tests as part of your merge request... Now a days there are even things like black [ https://github.com/ambv/black ] that does auto formatting just like gofmt.
comment by aprdm · 2019-01-23 · in Let’s stop copying C (2016) -
Yes. Most of the projects now use black https://github.com/ambv/black
comment by sametmax · 2018-11-22 · in Still in love with Rust -
Black (The uncompromising Python code formatter) is all the rage atm. https://github.com/ambv/black
comment by eirki · 2018-11-22 · in Still in love with Rust -
…difficult in many languages that weren't designed around the concept. Here's Black for python: https://github.com/ambv/black I'm not sure if my future co-workers would kill me or not for using it on projects.
comment by greglindahl · 2018-08-26 · in Tabs vs. spaces and other holy wars -
FWIW Black ( https://github.com/ambv/black ) is a disciplined Python formatter that's reasonably successful, so I'm not convinced that the "significant indentation" thing actually matters too much; it probably just means that formatters…
comment by alangpierce · 2018-07-30 · in Elastic TabStops: A Better Way to Indent and Align Code (2017) -
…gaining so much traction so quickly, and thanks for listening to users (when it makes sense). [0] https://github.com/ambv/black/issues/67
comment by jsmeaton · 2018-05-25 · in Black: An uncompromising Python code formatter -
…was a horse, I would find your bot charming. Speaking of linters, lately I've been using [Black]( https://github.com/ambv/black ) for my Python. Its self-description in that Readme sold me on it instantly. I wish you well with this! It is…
comment by dreyfiz · 2018-05-12 · in Show HN: I'm Creating a GitHub Repo Quality Bot