Replies: 2 comments
-
Hi @raylu , I implemented a hacky solution, which adds "fixes" on top of This code change currently does not cover quite a few edge cases, such as this: myFunc(
arg1,
arg2,
arg3,
myFunc2(
arg4,
arg5,
arg6),
arg7) And it is this example above that made me think that collapsing closing parenthesis may not be the best idea, because it can sort of lead to a "messy" rabbit hole. If I am already collapsing If you really feel strongly about implementing this style, please feel free to take over this PR of mine and add more test cases. Otherwise, I'm inclined to not support this. |
Beta Was this translation helpful? Give feedback.
-
hm... I'm starting to see why yapf tries to search the space of possible formats for the least cost now. the result is inscrutable, but you can get nice results like outer_call(arg1, arg2, arg3,
inner_call(arg4, arg5, arg6), arg7) I don't feel strongly. thanks for the quick response! |
Beta Was this translation helpful? Give feedback.
-
something that has always annoyed me about black is it will place closing
)}]
on its own lineI think this behavior is tolerable for
]
and}
, but I really dislike it for function calls (and I rarely building giant tuples). my ideal formatting would beif you could get me anywhere closer to that (especially for function calls in compound statements (
if
/for
)), that'd be great. do you have any interest in supporting this?Beta Was this translation helpful? Give feedback.
All reactions