Black produced different code on the second pass of the formatter #1995
Labels
C: unstable formatting
Formatting changed on the second pass
R: duplicate
This issue or pull request already exists
T: bug
Something isn't working
Describe the bug
Ran black on some unit tests and got the error
I've included a minimal reproduction of the failing code below.
To Reproduce
Take this file
Run Black on it with no arguments:
black .
See error:
Environment (please complete the following information):
Does this bug also happen on master?
Yes
Additional context
The first pass adds a trailing comma to
kwarg4
. The second pass wraps the expression in the assert statement in parentheses and expands onto multiple lines. Manually adding the trailing comma before running Black resolves the issue.The text was updated successfully, but these errors were encountered: