-
Notifications
You must be signed in to change notification settings - Fork 2.6k
magic trailing comma not working in certain scenario #3239
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
Comments
I believe I've fixed this on main (you'll need to remember to use |
at least according to https://black.vercel.app/?version=main&state=_Td6WFoAAATm1rRGAgAhARYAAAB0L-Wj4AC-AINdAD2IimZxl1N_WlbvK5V-fxcIRXBgNMb3PFjqcfxrMLJktSq6aRkCvRw96aIv09NBV5YAN_i6LoE0TXjAbbQNrVw7f1j0gc081LNWKW-py5In4PDB2yLCB7g7UtBGcgpzfVSuBjKXeq0n0j_UCcVdPayPJYNVCTnoYOpOVSTXbdZaNMEqAABhxmDJI41ybQABnwG_AQAAAG3WVrHEZ_sCAAAAAARZWg== - it doesn't seem fixed I checked the box that claims to use |
Yes, not fixed yet:
(22.8.0 is the same as main right now) |
@nipunn1313 your playground link does not check the box that says "Don't use trailing commas as a reason to split lines."
|
I want the default behavior of the magic trailing comma! It appears that the magic trailing comma's behavior is not being respected in this case. |
Okay, sure. Your issue title Note that this was a trailing comma that wasn't removed with |
OOPS. I totally inverted my statement in the title of the task! Booleans are hard. |
Yeah I think this is basically #1671. |
Describe the bug
Trailing commas are incorrectly being ruthlessly collapsed into one line
To Reproduce
Reproes in the black playground
Result is
Expected behavior
I'd expect no change to the Literal writeout.
Environment
Black 22.6.0 in the black playground.
Additional context
I noticed that if we eliminate the
self
argument, then black works correctly. Seems to have something to do with the fact that there are two trailing command in the method definition. Second one is not respected.The text was updated successfully, but these errors were encountered: