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
I experimented a bit and saw that this issue arises only when split_all_top_level_comma_separated_values is true. This cannot be fixed by using syntax like x, _ = or x, y = . A workaround is however to put enclosing brackets around the LHS like (x,) = or (x, _) = .
However, the fix seems to produce this weird effect as well:
The text was updated successfully, but these errors were encountered:
dnns92
changed the title
yapf with split_all_top_level_comma_separated_values set to true fails to split lines on tuple LHS
yapf with split_all_top_level_comma_separated_values set to true fails to split lines with tuple LHS
Feb 20, 2024
dnns92
changed the title
yapf with split_all_top_level_comma_separated_values set to true fails to split lines with tuple LHS
[BUG] yapf with split_all_top_level_comma_separated_values set to true fails to split lines with tuple LHS
Feb 26, 2024
Dear yapf-team,
for this code snippet, one would expect to receive a roughly same treatment of these two statements:
test.py
However, after running
yapf --style .\.style.yapf -rip test.py
with the.style.yapf
:We receive:
Expectation:
I experimented a bit and saw that this issue arises only when
split_all_top_level_comma_separated_values
istrue
. This cannot be fixed by using syntax likex, _ =
orx, y =
. A workaround is however to put enclosing brackets around the LHS like(x,) =
or(x, _) =
.However, the fix seems to produce this weird effect as well:
turns into
instead of how one would expect it:
The text was updated successfully, but these errors were encountered: