google / google/yapf

Indent closing bracket only after comma

Open
#832 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
14k
Forks
904
PR merge metrics
No merged PRs in 30d

Description

Hi all.

Cant't find way to indent closing bracket only after comma, i want my code to look like this:
```
fixed_parameters(
asd=1111111111111111111111111111111111111111,
bbbbbbbbbbbb='asdqwdqwdqwdaqw')
function_with_arbitrary_parameters(
asd=1111111111111111111111111111111111111111,
bbbbbbbbbbbb='asdqwdqwdqwdqw',
zxc={
'asdasdqwdqwdqwdqwd', '112312312312312312312',
'12dqadqdqd2d12d12 d1212d 12',
},
)
```
Option `indent_closing_brackets` always splits before closing bracket that is not desired if function receives fixed parameters. Actually i would like same for lists and generators.

PS i see that #780 is relatively new, and not much users may use it but i used it as it make code structure fine readable.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.