Black vs elm-format
Black
black.readthedocs.ioelm-format
github.comSide by side
| Figure | Black | elm-format |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| Self-hosted | Yes | — |
| Plans published | 1 | 1 |
| Spec score · Code Formatting Tools | 8.7 (#1) | 7.9 (#11) |
| Spec score · Code formatters | 8.7 (#1) | 7.8 (#5) |
| Consistent style | Black limits style options and aims to make code look consistent across projects. | The project says consistent formatting can make code easier to write, read, and maintain, and reduce team debates about formatting. |
| Editor integrations | The documentation describes integrations for editors including PyCharm, Vim, Neovim, Visual Studio Code, and Sublime Text. | The README lists integrations for Atom, Light Table, Vim, Emacs, Visual Studio Code, Sublime Text, JetBrains IDEs, and TextMate. |
| License | Black is licensed under the MIT license. | The repository identifies its license as BSD-3-Clause. |
| Purpose | Black is an opinionated formatter for Python code that follows PEP 8. | elm-format formats Elm source code according to rules based on the official Elm Style Guide. |
Plans
In their own words
Black
Black is a free, MIT-licensed formatter for Python code that follows PEP 8. It reformats whole files in place and uses a default line length of 88 characters. Its limited style choices are intended to keep code consistent across projects; indentation style cannot be configured. After formatting, Black checks whether the abstract syntax tree remains effectively equivalent and raises an error if the check fails. Install it with pip; it requires Python 3.10 or newer. The documentation lists editor integrations including Emacs, PyCharm, IntelliJ IDEA, Vim, Neovim, Visual Studio Code and Sublime Text, as well as GitHub Actions and doctest workflows. Notebook formatting is available with the jupyter extra, though Black skips cells containing certain magics or invalid syntax. It also includes blackd, an HTTP server that binds to localhost by default. Black is primarily a command-line tool and does not provide a Python interface. Stable releases preserve formatting within the same calendar year when the options match.