• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

psf / black / 2069
95%
master: 96%

Build:
Build:
LAST BUILD BRANCH: pre-commit-ci-update-config
DEFAULT BRANCH: master
Ran 25 Aug 2020 12:40AM UTC
Jobs 5
Files 8
Run time 38s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2069

push

travis-ci

ambv
Address pre-existing trailing commas when not in the rightmost bracket pair

This required some hackery.  Long story short, we need to reuse the ability to
omit rightmost bracket pairs (which glues them together and splits on something
else instead), for use with pre-existing trailing commas.

This form of user-controlled formatting is brittle so we have to be careful not
to cause a scenario where Black first formats code without trailing commas in
one way, and then looks at the same file with pre-existing trailing commas
(that it itself put on the previous run) and decides to format the code again.

One particular ugly edge case here is handling of optional parentheses.  In
particular, the long-standing `line_length=1` hack got in the way of
pre-existing trailing commas and had to be removed.  Instead, a more
intelligent but costly solution was put in place: a "second opinion" if the
formatting that omits optional parentheses ended up causing lines to be too
long.  Again, for efficiency purposes, Black reuses Leaf objects from blib2to3
and modifies them in place, which was invalid for having two separate
formattings.  Line cloning was used to mitigate this.

Fixes #1619

101 of 101 new or added lines in 2 files covered. (100.0%)

4685 of 4914 relevant lines covered (95.34%)

3.81 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2069.1 (TEST_CMD="pre-commit run --all-files --show-diff-on-failure") 25 Aug 2020 12:40AM UTC 0
0.0
Travis Job 2069.1
2 2069.2 (TEST_CMD="coverage run -m unittest") 25 Aug 2020 12:41AM UTC 0
95.12
Travis Job 2069.2
3 2069.3 (TEST_CMD="coverage run -m unittest") 25 Aug 2020 12:40AM UTC 0
95.12
Travis Job 2069.3
4 2069.4 (TEST_CMD="coverage run -m unittest") 25 Aug 2020 12:41AM UTC 0
95.2
Travis Job 2069.4
5 2069.5 (TEST_CMD="coverage run -m unittest") 25 Aug 2020 12:41AM UTC 0
95.16
Travis Job 2069.5
Source Files on build 2069
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2069
  • 244d1477 on github
  • Next Build on generic-should-explode (#1108)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc