Feature request: add option for adding trailing comma to arguments
In order to improve diffs I think it would be nice to be able to add trailing comma's to arguments to augment SPLIT_ARGUMENTS_WHEN_COMMA_TERMINATED.
Any update on this?
We here at YAPF, LLC. refuse to modify the code by adding or removing tokens.
If you want something that adds or removes commas, you can try Black. After Black makes the changes, you can then use yapf (there are no knobs in Black, except for -S and -C).
We here at YAPF, LLC. refuse to modify the code by adding or removing tokens.
Out of interest (and sorry if this is a point of discussion), why is that?
From the README.rst:
YAPF tries very hard to be fully PEP 8 compliant. However, it is paramount
to not risk altering the semantics of your code. Thus, YAPF tries to be as
safe as possible and does not change the token stream
(e.g., by adding parentheses).