Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python.announce > #3579

ANN: Blue 0.6.0 Released

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Grant Jenks <grant.jenks@gmail.com>
Newsgroups comp.lang.python.announce
Subject ANN: Blue 0.6.0 Released
Date Thu, 11 Feb 2021 21:34:02 -0800
Lines 135
Approved python-announce-list@python.org
Message-ID <161313543648.30198.python-announce-list@python.org> (permalink)
Reply-To python-list@python.org
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
X-Trace news.uni-berlin.de gdfVyLZhKlCZlPZlFWdsPwrwqm23BnozVzmbOdwdli6Q==
Authentication-Results mail.python.org; dkim=pass reason="2048-bit key; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=dMMXDPBX; dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'url-ip:140.82.121.4/32': 0.03; 'url-ip:140.82.121/24': 0.03; 'url-ip:140.82/16': 0.03; 'skip:= 10': 0.04; 'url:psf': 0.05; 'carefully': 0.07; 'maintainers': 0.07; 'pep': 0.07; 'ticket': 0.07; '===========': 0.09; 'announcing': 0.09; 'considering.': 0.09; 'fork': 0.09; 'namespace': 0.09; 'skip:` 10': 0.09; 'suggestion,': 0.09; 'to:addr:python-announce-list': 0.09; 'url:release': 0.09; 'url:stable': 0.09; 'looks': 0.12; 'url-ip:140/8': 0.12; 'url:github': 0.15; 'python': 0.15; '====': 0.16; 'barry': 0.16; 'base.': 0.16; 'because,': 0.16; 'better!': 0.16; 'bugs': 0.16; 'characters.': 0.16; 'comments.': 0.16; 'defaults': 0.16; 'deviations': 0.16; 'experienced,': 0.16; 'hash': 0.16; 'inspired': 0.16; 'invoke': 0.16; 'nick': 0.16; 'painful': 0.16; 'relatively': 0.16; 'retired.': 0.16; 'somewhat': 0.16; 'strings,': 0.16; 'subject:ANN': 0.16; 'subject:Released': 0.16; 'url:latest': 0.16; 'url:workflow': 0.16; 'grant': 0.17; 'python,': 0.17; 'implement': 0.18; 'maybe': 0.20; 'issue': 0.21; 'version': 0.21; 'project.': 0.22; 'idea': 0.22; 'code': 0.23; 'configure': 0.23; 'creates': 0.23; "what's": 0.23; 'command': 0.24; 'probably': 0.24; 'anything': 0.25; 'logo': 0.26; 'seems': 0.27; 'leave': 0.27; 'mark': 0.27; 'bit': 0.28; 'url- ip:104.17/16': 0.29; "we'll": 0.29; 'single': 0.30; '(and': 0.30; 'but': 0.31; 'using': 0.31; 'code,': 0.31; 'fixed': 0.32; 'folks': 0.32; 'differences': 0.33; 'intend': 0.33; 'message- id:@mail.gmail.com': 0.33; 'particular': 0.34; 'setting': 0.34; 'suggestions': 0.34; 'received:google.com': 0.34; 'change': 0.35; 'same': 0.35; 'from:addr:gmail.com': 0.35; 'release': 0.35; 'able': 0.36; 'those': 0.37; 'at:': 0.37; 'cases': 0.37; 'something': 0.38; 'use': 0.38; 'list': 0.38; 'url- ip:13.107.42/24': 0.39; 'where': 0.39; 'going': 0.39; 'details': 0.60; 'color': 0.60; 'multiple': 0.60; 'love': 0.61; 'here': 0.61; 'lot': 0.61; 'replace': 0.62; 'top': 0.62; 'hope': 0.63; 'nearly': 0.63; 'url-ip:172.67/16': 0.63; 'our': 0.63; 'url:%0': 0.64; 'everything': 0.64; 'within': 0.65; 'your': 0.65; 'black': 0.65; 'url:%20': 0.65; 'instead,': 0.65; 'company': 0.66; 'right': 0.66; 'back': 0.66; 'url-ip:104.21/16': 0.67; 'less': 0.67; 'listed': 0.68; 'url:img': 0.68; 'choice': 0.68; 'exactly': 0.69; 'files:': 0.70; 'url:svg': 0.70; 'terms': 0.71; 'reasons': 0.71; 'live': 0.72; 'little': 0.74; 'url:%3a': 0.76; 'formatting': 0.77; 'mit': 0.77; 'beat': 0.84; 'corey': 0.84; 'disagree': 0.84; 'eventually': 0.84; 'hacks': 0.84; 'license.': 0.84; 'licensed': 0.84; 'merchandise': 0.84; 'socialize': 0.84; 'strings': 0.84; 'taken.': 0.84; 'url-ip:104.21.2/24': 0.84; 'url-ip:172.67.129/24': 0.84; 'us!': 0.84; 'largely': 0.91; 'url-ip:45.60/16': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=CSHEEUCnghhSic7OyFZK36CcXrNzg3LLdrJgm+Of+F8=; b=dMMXDPBXOjzWjEZ56L8uGDA7EPCYh+LchtyAYe9R9++pq+GgQeXOsxmam8vC6h3BKP dfLiCKs2VAxocat6mc34Vndz75LuHaYgEZIiODv/mef4WirWi/VrUaNceyT3xg5PhH7l tzwKZO8Bf1ueIDn97VpQJbvCxt55+oonDmylxDAodrp8HME5Qcisy3oRWATiHMBy+wcr jSwE6OdEGI/b3oBx0OkMr0Ft9VNqEjdu11rHqTlgCemtAYbW3yuPekUZKKOmS1zjl7MO d55SE3kG9/JCgQTO4DuILNw5HNaG5W7xSr2uyi46kc0lz54HX4Wq+JXn9BClUTcjF/gp E7RQ==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=CSHEEUCnghhSic7OyFZK36CcXrNzg3LLdrJgm+Of+F8=; b=Z+LCzScJIWAhBMvobUYoGE0lkaYGtHrqXh5brAgtuu5+rFAwWWL3aR8QJPEF5vFh1C l8VYUGUcuhUM5Zs5eTM47F8xEaKj8J/yS/M70ze9mf8FWHkYPm8bW0zTYvOO9tM05yYP udkoB1fwj2H0P9Hn/eGWLkn/d1x28MBkh4HuKquLng4rf1+rrfV2JpjdXb58sv3WzznP 59Im3ewelV3aNzmgI8IWA9racXYc4PqkPYMGFNviS9jMf6mbTwhFskXF8lY+CvFXqt3t um2wJBvl8Bdk3/J5Jr3dDFlSGN1O84xe0/r1pi8q2sTvrAkCkxRhUeQfdUL/JaZKDNCp 3qKg==
X-Gm-Message-State AOAM533AHDggKm5oF2q5adKPSXLxdxqiH2No658z+xevnK5q9Kd7Wf9d TlARdBWx5e/kCI/D6hHRxooST8UYSV2a860b6SgG/6r+7of1Ng==
X-Google-Smtp-Source ABdhPJx/QaDnnR3xlmMmY45xo0mCaU+gGtPDzTccIxtm+vdmpBVAolYDXbU/x+oDH4fFrTcNUtryVbpwIFlHmiE83R4=
X-Received by 2002:a05:6402:1589:: with SMTP id c9mr1661758edv.282.1613108058362; Thu, 11 Feb 2021 21:34:18 -0800 (PST)
X-MailFrom grant.jenks@gmail.com
X-Mailman-Rule-Hits emergency
X-Mailman-Rule-Misses dmarc-mitigation; no-senders; approved
Message-ID-Hash KZ6RV65DL5XK6OY47MMXHW5F447Q6SBS
X-Message-ID-Hash KZ6RV65DL5XK6OY47MMXHW5F447Q6SBS
X-Mailman-Approved-At Fri, 12 Feb 2021 08:10:21 -0500
X-Mailman-Version 3.3.4b1
Precedence list
List-Id Announcement-only list for the Python programming language <python-announce-list.python.org>
Archived-At <https://mail.python.org/archives/list/python-announce-list@python.org/message/KZ6RV65DL5XK6OY47MMXHW5F447Q6SBS/>
List-Archive <https://mail.python.org/archives/list/python-announce-list@python.org/>
List-Help <mailto:python-announce-list-request@python.org?subject=help>
List-Owner <mailto:python-announce-list-owner@python.org>
List-Post <mailto:python-announce-list@python.org>
List-Subscribe <mailto:python-announce-list-join@python.org>
List-Unsubscribe <mailto:python-announce-list-leave@python.org>
Xref csiph.com comp.lang.python.announce:3579

Show key headers only | View raw


Announcing the release of Blue version 0.6.0!

2021-02-11 (0.6.0)
==================

* Preserve the whitespace before the hash mark for right hanging
  comments. (GH#20)

* Support multiple config files: pyproject.toml, setup.cfg, tox.ini, and .blue
  (GH#30)

* Fixed blue --version (GH#32)

* Added tests!


====
Blue
====

Some folks like `black <https://black.readthedocs.io/en/stable/>`_ but I
prefer `blue <https://blue.readthedocs.io/en/latest/>`_.


What is blue?
=============

``blue`` is a somewhat less uncompromising code formatter than ``black``, the
OG of Python formatters.  We love the idea of automatically formatting Python
code, for the same reasons that inspired ``black``, however we take issue with
some of the decisions ``black`` makes.  Kudos to ``black`` for pioneering code
formatting for Python, and for its excellent implementation.

Where the ``blue`` maintainers disagree with the stylistic (and
unconfigurable) choices made by ``black``, we monkeypatch to change these
decisions to our own liking.  We intend for these differences to be minimal;
even in cases where we'd prefer something different, there's a lot we can live
with for the sake of consistency.

We'd prefer not to fork or monkeypatch.  Instead, our hope is that eventually
we'll be able to work with the ``black`` maintainers to add just a little bit
of configuration and merge back into the ``black`` project.  We'd be ecstatic
if ``blue`` eventually were retired.  Until then, we'll maintain our small set
of hacks on top of ``black`` and carefully consider what other deviations are
needed to assuage our sensitive, but experienced, eye.


How do I use blue?
==================

Exactly the same as you would use ``black``.  Invoke and configure ``blue`` as
you would ``black`` -- just replace the ``black`` command with ``blue``, sit
back, and enjoy even betterly formatted Python code!  You can refer to
`black's <https://black.readthedocs.io/en/stable/>`_ documentation for
anything not listed here.


So what's different?
====================

Here is a brief list of differences between ``blue`` and ``black``:

* ``blue`` defaults to single-quoted strings.  This is probably the most
  painful ``black`` choice to our eyes, and the thing that inspired ``blue``.
  We strongly prefer using single quoted strings over double quoted strings
  for everything *except* docstrings.  Don't ask us why we prefer double
  quoted strings for docstrings; it just looks better to us!  For all other
  strings, ``blue`` defaults to single quoted strings.

* ``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``.

We are `accumulating <https://github.com/grantjenks/blue/issues/2>`_ a list of
other deviations we are considering.  As we decide to implement any particular
suggestion, we'll turn those into individual issues and tackle them
one-by-one.  If you have suggestions for other deviations from ``black``'s
choices, please open a separate ticket on our tracker, and we'll see how it
goes!


Why "blue"?
===========

Several reasons!  If your formatter is going to beat up your code, it'll leave
it black and blue, or maybe in this case, black *or* blue.  Blue is better!

We also thought about "tan" because, yum!  But that project name was already
taken.  Frankly, "blue" was also taken, but largely unused.  Our thanks to
Nick Ficano for donating the project namespace to us!

Blue is also the color of `LinkedIn <https://www.linkedin.com/>`_, the
authors' gracious employer, and we intend to socialize its use within our
company code base.


Contributors
============

``blue`` thanks this list of contributors for all its wonderful goodness.

* The `wonderful folks <https://github.com/psf/black#authors>`_ from the
  ``black`` project.
* Grant Jenks
* Barry Warsaw
* Corey from FutureSpaceDesigns for the unofficial logo and `blue project
  merchandise <https://www.teepublic.com/t-shirt/6556561-tobias-blue>`_.

``blue`` is licensed under the terms of the Apache License Version 2.0.
``black`` is `licensed <https://github.com/psf/black#license>`_ under the
terms of the MIT license.


Project details
===============

.. image:: https://img.shields.io/badge/code%20style-blue-blue.svg
   :target: https://blue.readthedocs.io/

.. image:: https://github.com/grantjenks/blue/workflows/integration/badge.svg
   :target: https://github.com/grantjenks/blue/actions?query=workflow%3Aintegration

.. image:: https://github.com/grantjenks/blue/workflows/release/badge.svg
   :target: https://github.com/grantjenks/blue/actions?query=workflow%3Arelease

* Project home: https://github.com/grantjenks/blue
* Report bugs and suggestions at: https://github.com/grantjenks/blue/issues
* Code hosting: https://github.com/grantjenks/blue.git
* Documentation: https://blue.readthedocs.io/en/latest

Back to comp.lang.python.announce | Previous | Next | Find similar | Unroll thread


Thread

ANN: Blue 0.6.0 Released Grant Jenks <grant.jenks@gmail.com> - 2021-02-11 21:34 -0800

csiph-web