You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 1, 2019. It is now read-only.
This is wrong on two accounts: The multi-assignment should never be assigned to a tuple like that (even though it's syntactically correct, nobody does that). And the arguments to the method called on top of that shouldn't be rewrapped into a single line as that line ends up being too long. (Default params except tab, so 80 line length)
The text was updated successfully, but these errors were encountered:
It knows that the line can be split before operators (which, although feasible, is almost never correct to do) and does it twice because that's how small it can get the line to be.
So I guess there's three issues but all boil down to the first one:
prettier-python should learn how to split function arguments on newlines when necessary
Yeah, there's a lot of formatting behavior that was roughed out just to get stuff printing, but it doesn't all wrap as one might expect. Two of the issues you highlighted here (wrapping function calls and how wrapping works after an equals sign) should both be improved by #52, and indeed both of your inputs remain unchanged when formatted by the code in that PR. I think the third point (operator newlines should be avoided) will come naturally as the other aspects are improved. The only reason it broke there was because nothing else offered to break farther up the print tree.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Found this issue in my codebase.
Input:
Output:
This is wrong on two accounts: The multi-assignment should never be assigned to a tuple like that (even though it's syntactically correct, nobody does that). And the arguments to the method called on top of that shouldn't be rewrapped into a single line as that line ends up being too long. (Default params except tab, so 80 line length)
The text was updated successfully, but these errors were encountered: