Open concretevitamin opened 7 years ago
Another workaround would be to enable the knob split_arguments_when_comma_terminated=True
(which imho is a good idea anyway) and add a ,
after the last element of the array. Each element will then be put on a separate line.
That works! I will leave this open in case the maintainers decide a direct solution is desirable.
What @flunderpero suggested is the recommended way of "fixing" this. There might be a better heuristic we can apply here, but it will take a bit of thinking...
Here's a diff before and after yapf with google style:
I think we can agree the before version is more readable ;) I can think of several possibilities:
EACH_DICT_ENTRY_ON_SEPARATE_LINE
counterpart forOrderedDict
?