Page MenuHomePhabricator

black: format some files in preparation for subsequent changes
AbandonedPublic

Authored by dploch on Jul 8 2020, 6:50 PM.

Details

Reviewers
martinvonz
mjacob
Group Reviewers
hg-reviewers

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

dploch created this revision.Jul 8 2020, 6:50 PM
mjacob requested changes to this revision.Jul 8 2020, 8:08 PM
mjacob added a subscriber: mjacob.

Our sources should already be formatted. E.g. if I run black --config=black.toml hgext/rebase.py, it doesn’t change anything. The tests would catch if a file should be reformatted.

mercurial/state.py
33

This re-formatting is wrong. I could not find any way to run black such that it produces this change.

This revision now requires changes to proceed.Jul 8 2020, 8:08 PM

Yeah, if you’re seeing these changes I’m pretty sure you have a too-old black...

dploch abandoned this revision.Fri, Jul 10, 9:12 PM

Sorry for the noise. There was some conflict between our internal fix configuration and the black.toml setup in the hg repo; I thought I had sorted it out but I was mistaken (and black apparently leaves the opinionated quotation-style changes in place, it doesn't have its own opinion about them?)

I have black --version: 19.3b0, which looks like one off from the most current version, so I don't think that's the issue. I'm still getting the changes for from foo import ( a, b ) [multiline] -> from foo import a, b [oneline] though, even from tip. Is no one else getting even those with the current version of black?

Regardless, I'm fine dropping this change since it seems to mostly be in error. I'll abandon this revision.