blue is a somewhat less uncompromising code formatter than black, the OG of Python formatters.
This is free and open source software.
Some of the differences between blue and black:
- blue defaults to single-quoted strings. For all other strings, blue defaults to single quoted strings. In the case of docstrings, those always use TQS with double-quotes.
- blue defaults to line lengths of 79 characters. Nearly every project creates a pyproject.toml just to change this one setting so making it consistent with PEP 8 seems relatively harmless.
- blue preserves the whitespace before the hash mark for right hanging comments.
- blue supports multiple config files: pyproject.toml, setup.cfg, tox.ini, and .blue.
Website: github.com/grantjenks/blue
Support:
Developer: Grant Jenks and Barry Warsaw
License: Apache License 2.0
blue is written in Python. Learn Python with our recommended free books and free tutorials.
Related Software
| Python Code Formatters | |
|---|---|
| Ruff | Extremely fast Python linter and code formatter |
| YAPF | Python formatter based on clang-format |
| Black | Uncompromising Python code formatter |
| isort | Python utility and library to sort imports |
| autopep8 | Formats Python code to conform to the PEP 8 style guide |
| Darker | Apply black reformatting to Python files |
| Pyink | Python code formatter |
| blue | Somewhat less uncompromising code formatter than black |
| μsort | Sorts import statements |
| eradicate | Remove commented-out code from Python files |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

