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

psf / black / 2572 / 1
96%
master: 96%

Build:
DEFAULT BRANCH: master
Ran 18 Mar 2021 03:16PM UTC
Files 0
Run time 0s
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

18 Mar 2021 03:14PM UTC coverage: 0.0%. Remained the same
TEST_CMD="pre-commit run --all-files --show-diff-on-failure"

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)

0 of 0 relevant lines covered (NaN%)

0.0 hits per line

Source Files on job 2572.1 (TEST_CMD="pre-commit run --all-files --show-diff-on-failure")
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 2280
  • Travis Job 2572.1
  • d62d677c on github
  • Prev Job for TEST_CMD="pre-commit run --all-files --show-diff-on-failure" on master (#2568.1)
  • Next Job for TEST_CMD="pre-commit run --all-files --show-diff-on-failure" on master (#2577.1)
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