Open LuisBL opened 7 years ago
I don't think there is. The issue here is that the first element being a dictionary can cause the formatter to create really horrible looking code. (Think of your second example with the {
still on the first line. It would indent the project_id
argument over to the column that the {
is in.) YAPF instead chooses to split before the dictionary (it does the same to function calls as the first argument).
git.project_members.create({
'user_id': user.id,
'access_level': gitlab.DEVELOPER_ACCESS
},
project_id=project.id)
One exception may be that if the dictionary fit on a single line, then it probably should be output on a single line, but this won't help your code in general.
I'm not entirely sure how to proceed with this. If we don't split before the dictionary, the code will look horrible...
I whould like to keep args indented like this:
But I get this:
Is there a way with options to keep my favorit indentation for funtions args ?