google / google/yapf

Add SPLIT_BETWEEN_ENDING_COMMA_AND_CLOSING_BRACKET knob?

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

Description

Hi,

I didn't manage to get the style that I wanted:

* multi-line lists/dicts/.. that end with a comma should be with all items on a separate line:

```
x = [
asdf,
bsdf,
csdf,
]
```

But ones that aren't comma-terminated should be more compact:

```
y = ({
'asdf': [],
'bsdf': []})
```

I didn't manage to get this with the existing knobs and I haven't found a different issue discussing this.

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.