blue

The slightly less uncompromising Python code formatter.

https://github.com/grantjenks/blue

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.9%) to scientific vocabulary

Keywords

autopep8 black code codeformatter formatter gofmt pyfmt python yapf
Last synced: 6 months ago · JSON representation

Repository

The slightly less uncompromising Python code formatter.

Basic Info
Statistics
  • Stars: 404
  • Watchers: 7
  • Forks: 23
  • Open Issues: 37
  • Releases: 0
Topics
autopep8 black code codeformatter formatter gofmt pyfmt python yapf
Created over 5 years ago · Last pushed about 2 years ago
Metadata Files
Readme License

README.rst

====
Blue
====

Some folks like `black `_ but I
prefer `blue `_.


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 `_ documentation for
anything not listed here.

Try it out now using `iblueit.dev `_.

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

We are `accumulating `_ 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 `_, 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 `_ from the
  ``black`` project.
* Grant Jenks
* Barry Warsaw
* Corey from FutureSpaceDesigns for the unofficial logo and `blue project
  merchandise `_.

``blue`` is licensed under the terms of the Apache License Version 2.0.
``black`` is `licensed `_ 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
* Try it out: https://iblueit.dev

Owner

  • Name: Grant Jenks
  • Login: grantjenks
  • Kind: user
  • Location: Bay Area, CA

listen | learn | think | solve

GitHub Events

Total
  • Watch event: 22
  • Issue comment event: 1
  • Pull request event: 1
  • Fork event: 2
Last Year
  • Watch event: 22
  • Issue comment event: 1
  • Pull request event: 1
  • Fork event: 2

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 83
  • Total Committers: 11
  • Avg Commits per committer: 7.545
  • Development Distribution Score (DDS): 0.59
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Grant Jenks g****s@g****m 34
Grant Jenks g****s@l****m 22
Barry Warsaw b****w@l****m 18
rotten r****n@w****t 2
Shantanu 1****a 1
Ryan Gonzalez r****9@g****m 1
Luiz F. A. de Prá l****a 1
Erich Seifert d****v@e****e 1
Chris Markiewicz e****s@g****m 1
Chris Carini 6****i 1
Bruno Alla b****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 67
  • Total pull requests: 40
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 23 days
  • Total issue authors: 33
  • Total pull request authors: 15
  • Average comments per issue: 2.27
  • Average comments per pull request: 0.88
  • Merged pull requests: 28
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • grantjenks (25)
  • warsaw (7)
  • rhettinger (3)
  • ChrisCarini (2)
  • mcepl (2)
  • KOLANICH (1)
  • petdance (1)
  • drewpearce (1)
  • gturbyne (1)
  • igordertigor (1)
  • bukzor-sentryio (1)
  • haxwithaxe (1)
  • RobertCraigie (1)
  • thinkwelltwd (1)
  • phumke (1)
Pull Request Authors
  • warsaw (14)
  • grantjenks (10)
  • browniebroke (3)
  • MeggyCal (2)
  • effigies (2)
  • luizdepra (1)
  • ChrisCarini (1)
  • gistart (1)
  • rotten (1)
  • danigm (1)
  • Tyler887 (1)
  • eseifert (1)
  • hauntsaninja (1)
  • refi64 (1)
  • kaweantonio (1)
Top Labels
Issue Labels
formatting-idea (5) bug (2) documentation (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 104,543 last-month
  • Total docker downloads: 318
  • Total dependent packages: 18
    (may contain duplicates)
  • Total dependent repositories: 293
    (may contain duplicates)
  • Total versions: 11
  • Total maintainers: 2
pypi.org: blue

Blue -- Some folks like black but I prefer blue.

  • Versions: 9
  • Dependent Packages: 18
  • Dependent Repositories: 293
  • Downloads: 104,543 Last month
  • Docker Downloads: 318
Rankings
Dependent packages count: 0.7%
Dependent repos count: 0.9%
Downloads: 1.7%
Average: 3.1%
Stargazers count: 3.4%
Docker downloads count: 3.6%
Forks count: 8.2%
Maintainers (2)
Last synced: 6 months ago
conda-forge.org: blue
  • Homepage: https://iblueit.dev/
  • License: Apache-2.0
  • Latest release: 0.9.1
    published over 3 years ago
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 22.8%
Dependent repos count: 34.0%
Average: 37.0%
Forks count: 40.0%
Dependent packages count: 51.2%
Last synced: 6 months ago

Dependencies

docs/requirements.txt pypi
  • black ==21.7b0
  • flake8 ==3.8.4
requirements.txt pypi
  • doc8 *
  • flake8 <5.0.0
  • pytest *
  • pytest-cov *
  • rstcheck *
  • sphinx *
  • tox *
  • twine *
  • wheel *
setup.py pypi
  • black ==22.1.0
  • flake8 >=3.8,<5.0.0
.github/workflows/integration.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/release.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
tests/config_pyproject/pyproject.toml pypi