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

psf / black / 2572
96%

Build:
DEFAULT BRANCH: master
Ran 18 Mar 2021 03:16PM 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
2572

push

travis-ci

web-flow
<a href="https://github.com/psf/black/commit/<a class=hub.com/psf/black/commit/<a class="double-link" href="https://git"><a class=hub.com/psf/black/commit/d62d677ca2135714d6159f6b4839983fb0a557c8">d62d677ca">&lt;a href=&quot;https://github.com/psf/black/commit/</a><a class="double-link" href="https://github.com/psf/black/commit/d62d677ca2135714d6159f6b4839983fb0a557c8">d62d677ca</a><a href="https://github.com/psf/black/commit/d62d677ca2135714d6159f6b4839983fb0a557c8">&quot;&gt;Recommend B950 + 88 char limit instead of 80 (#2050)

[The section about line length][1] was contradictory.

On one side, it said:

&amp;gt; Black will try to respect that [line length limit]. However, sometimes it won&amp;#39;t be able to without breaking other rules. In those rare cases, auto-formatted code will exceed your allotted limit.

So black doesn&amp;#39;t guarantee that your code is formatted at 88 chars, even when configured with `--line-length=88` (default). Black uses this limit as a &amp;quot;hint&amp;quot; more than a &amp;quot;rule&amp;quot;.

OTOH, it also said:

&amp;gt; If you&amp;#39;re using Flake8, you can bump max-line-length to 88 and forget about it. Alternatively, use Bugbear&amp;#39;s B950 warning instead of E501 and keep the max line length at 80 which you are probably already using.

But that&amp;#39;s not true. You can&amp;#39;t &amp;quot;forget about it&amp;quot; because Black sometimes won&amp;#39;t respect the limit. Both E501 at 88 and B950 at 80 behave the same: linter error at 89+ length. So, if Black happens to decide that a line of code is better at 90 characters that some other fancy style, you land on a unlucky situation where both tools will fight.

So, AFAICS, the best way to align flake8 and black is to:

1. Use flake8-bugbear
2. Enable B950
3. Disable E501
4. Set `max-line-length = 88`

This way, we also tell flake8 that 88 limit is a &amp;quot;hint&amp;quot; and not a &amp;quot;rule&amp;quot;. The real rule will be 88 + 10%. If black decides that a line fits better in 97 characters than in 88 + some formatting, _that_ probably mea... (continued)

4760 of 4985 relevant lines covered (95.49%)

3.81 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2572.1 (TEST_CMD="pre-commit run --all-files --show-diff-on-failure") 18 Mar 2021 03:16PM UTC 0
0.0
Travis Job 2572.1
2 2572.2 (TEST_CMD="tox -e py") 18 Mar 2021 03:16PM UTC 0
95.19
Travis Job 2572.2
3 2572.3 (TEST_CMD="tox -e py") 18 Mar 2021 03:16PM UTC 0
95.19
Travis Job 2572.3
4 2572.4 (TEST_CMD="tox -e py") 18 Mar 2021 03:17PM UTC 0
95.29
Travis Job 2572.4
5 2572.5 (TEST_CMD="tox -e py") 18 Mar 2021 03:19PM UTC 0
95.27
Travis Job 2572.5
Source Files on build 2572
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2572
  • d62d677c on github
  • Prev Build on master (#2568)
  • Next Build on master (#2577)
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