-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: Unstable formatting on long strings #1042
Comments
Closed
Closed
Like #1044, git bisect points to the same 957ba24 in PR #850 to fix #548:
Again, the second pass is stable and leads to no further formatting. |
Sounds like we should back out that change. |
Merged
JelleZijlstra
added a commit
that referenced
this issue
Oct 20, 2019
Fixes #1042 (and probably #1044 which looks like the same thing). The issue with the "obviously unnecessary" parentheses that #850 removed is that sometimes they're necessary to help Black fit something in one line. I didn't see an obvious solution that still removes the parens #850 was intended to remove, so let's back out this change for now in the interest of unblocking a release. This PR also adds a test adapted from the failing example in #1042, so that if we try to reapply the #850 change we don't break the same case again.
amyreese
pushed a commit
to amyreese/black
that referenced
this issue
May 7, 2020
Fixes psf#1042 (and probably psf#1044 which looks like the same thing). The issue with the "obviously unnecessary" parentheses that psf#850 removed is that sometimes they're necessary to help Black fit something in one line. I didn't see an obvious solution that still removes the parens psf#850 was intended to remove, so let's back out this change for now in the interest of unblocking a release. This PR also adds a test adapted from the failing example in psf#1042, so that if we try to reapply the psf#850 change we don't break the same case again.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tested Black master on our codebase in preparation for a release, but found that Black failed to format 17 files (the previous release didn't crash on any of our files). It's not clear that all of these have the same root cause, but here's one I minimized somewhat:
The text was updated successfully, but these errors were encountered: