Jelle Zijlstra
Jelle Zijlstra
It's fine to rely on CI to run diff-shades for you. I haven't looked closely here but probably you just need to gate your changes to the preview style.
Easiest to fix simple merge conflicts by going through GitHub's UI, I just did it for you.
Not a full review (and I know this is still a draft), but please try to keep unnecessary changes to a minimum to reduce churn.
I was going to point out 1. but you beat me :) I don't think 2. is a problem: the parentheses around each `and` are preserved, it just adds new...
I noticed this one: ``` - df["category"] = Series( - np.array(list("abcdefghij")).take(np.random.randint(0, 10, size=n)) - ).astype("category") + df["category"] = ( + Series( + np.array(list("abcdefghij")).take(np.random.randint(0, 10, size=n)) + ).astype("category") + ) ```...
Also wanted to mention that most of the changes in diff-shades are clear improvements. This is going to be a positive change.
The last case is a duplicate of #510 (attribute chains). You mention various other cases, but those should get specific issues in the https://github.com/psf/black/labels/F%3A%20linetoolong label.
I'm not sure this is supposed to work. `# fmt: off` is documented as working on blocks (https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html), not on every possible subexpression.
I think a NEWS entry is helpful here because this could affect redistributors or users who are trying to run the tests locally.
Reopening as there's an active PR fixing this.