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

psf / black / 2726
96%

Build:
DEFAULT BRANCH: master
Ran 25 Apr 2021 06:17PM UTC
Jobs 5
Files 11
Run time 2min
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
2726

push

travis-ci

web-flow
Work around stability errors due to optional trailing commas (#2126)

Optional trailing commas put by Black become magic trailing commas on another
pass of the tool.  Since they are influencing formatting around optional
parentheses, on rare occasions the tool changes its mind in terms of putting
parentheses or not.

Ideally this would never be the case but sadly the decision to put optional
parentheses or not (which looks at pre-existing "magic" trailing commas) is
happening around the same time as the decision to put an optional trailing
comma.  Untangling the two proved to be impractically difficult.

This shameful workaround uses the fact that the formatting instability
introduced by magic trailing commas is deterministic: if the optional trailing
comma becoming a pre-existing "magic" trailing comma changes formatting, the
second pass becomes stable since there is no variable factor anymore on pass 3,
4, and so on.

For most files, this will introduce no performance penalty since `--safe` is
already re-formatting everything twice to ensure formatting stability.  We're
using this result and if all's good, the behavior is equivalent.  If there is
a difference, we treat the second result as the binding one, and check its
sanity again.

4824 of 5061 relevant lines covered (95.32%)

3.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2726.1 (TEST_CMD="pre-commit run --all-files --show-diff-on-failure") 25 Apr 2021 06:17PM UTC 0
0.0
Travis Job 2726.1
2 2726.2 (TEST_CMD="tox -e py") 25 Apr 2021 06:18PM UTC 0
95.02
Travis Job 2726.2
3 2726.3 (TEST_CMD="tox -e py") 25 Apr 2021 06:18PM UTC 0
95.02
Travis Job 2726.3
4 2726.4 (TEST_CMD="tox -e py") 25 Apr 2021 06:18PM UTC 0
95.13
Travis Job 2726.4
5 2726.5 (TEST_CMD="tox -e py") 25 Apr 2021 06:20PM UTC 0
95.11
Travis Job 2726.5
Source Files on build 2726
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2726
  • 8672af35 on github
  • Prev Build on master (#2722)
  • Next Build on master (#2727)
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