blue – Python code formatter

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
RuffExtremely fast Python linter and code formatter
YAPFPython formatter based on clang-format
BlackUncompromising Python code formatter
isortPython utility and library to sort imports
autopep8Formats Python code to conform to the PEP 8 style guide
DarkerApply black reformatting to Python files
PyinkPython code formatter
docformatterAutomatically formats Python docstrings for consistent style
SSortSorts Python statements by dependency for clearer code
reorder-python-importsReorders Python imports into a consistent, readable layout
μsortSorts import statements
eradicateRemove commented-out code from Python files

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted