This is an archive of the discontinued Mercurial Phabricator instance.

black: make codebase compatible with black v21.4b2 and v20.8b1
ClosedPublic

Authored by spectral on Apr 30 2021, 7:20 PM.

Details

Summary

I don't know what exact version of black made it care about these whitespace
differences, but this is the version I got when I just installed it with
pip3 install black.

I'm intentionally not increasing the version of black required, as I don't want
to force everyone to upgrade their version of black, and these fixes are
backwards compatible with black v20.8b1. If there are more issues in the future
and this becomes a maintenance burden I may do so in a future change.

Tested with both versions of black (I got the older version via
pip3 install black==20.8b1)

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

spectral created this revision.Apr 30 2021, 7:20 PM
SimonSapin accepted this revision.May 3 2021, 2:30 PM
SimonSapin added a subscriber: SimonSapin.

test-check-format.t also fails on my machine after updating black. This patch looks good, it only touches whitespace inside doc-strings

Alphare accepted this revision.May 6 2021, 4:59 AM
This revision is now accepted and ready to land.May 6 2021, 4:59 AM

This will go to the stable branch