Package: blue
Some folks likeblackbut I
preferblue.What is blue?blueis a somewhat less uncompromising code formatter thanblack, the
OG of Python formatters.  We love the idea of automatically formatting Python
code, for the same reasons that inspiredblack, however we take issue with
some of the decisionsblackmakes.  Kudos toblackfor pioneering code
formatting for Python, and for its excellent implementation.Where thebluemaintainers disagree with the stylistic (and
unconfigurable) choices made byblack, 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 theblackmaintainers to add just a little bit
of configuration and merge back into theblackproject.  We’d be ecstatic
ifblueeventually were retired.  Until then, we’ll maintain our small set
of hacks on top ofblackand 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 useblack.  Invoke and configureblueas
you wouldblack– just replace theblackcommand withblue, sit
back, and enjoy even betterly formatted Python code!  You can refer toblack’sdocumentation for
anything not listed here.Try it out now usingiblueit.dev.So what’s different?Here is a brief list of differences betweenblueandblack:bluedefaults to single-quoted strings.  This is probably the most
painfulblackchoice to our eyes, and the thing that inspiredblue.
We strongly prefer using single quoted strings over double quoted strings for
everythingexceptdocstrings and triple quoted strings (TQS).  Don’t ask us
why we prefer double-quotes for TQS; it just looks better to us!  For all
other strings,bluedefaults to single quoted strings.  In the case of
docstrings, those always use TQS with double-quotes.bluedefaults 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.bluepreserves the whitespace before the hash mark for right hanging
comments.bluesupports multiple config files:pyproject.toml,setup.cfg,tox.ini, and.blue.We areaccumulatinga 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 fromblack’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, blackorblue.  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 ofLinkedIn, the
authors’ gracious employer, and we intend to socialize its use within our
company code base.Contributorsbluethanks this list of contributors for all its wonderful goodness.Thewonderful folksfrom theblackproject.Grant JenksBarry WarsawCorey from FutureSpaceDesigns for the unofficial logo andblue project
merchandise.blueis licensed under the terms of the Apache License Version 2.0.blackislicensedunder the
terms of the MIT license.Project detailsProject home:https://github.com/grantjenks/blueReport bugs and suggestions at:https://github.com/grantjenks/blue/issuesCode hosting:https://github.com/grantjenks/blue.gitDocumentation:https://blue.readthedocs.io/en/latestTry it out:https://iblueit.dev