Leave single argument with trailing comma on own line
Open
- Dominant language
- Python
- Stars
- 14k
- Forks
- 904
- PR merge metrics
- No merged PRs in 30d
Description
Right now, I don't believe there's a way to have yapf put a single argument to a function on its own line when there's a trailing comma. For example,
```python
bar = foo(
"only item",
)
```
gets formatted as
```
bar = foo("only item",)
```
whereas I prefer it to remain as-is, given the presence of a trailing comma.
On the other hand, lines such as
```python
bar = foo(
"first item",
"second item",
)
```
are left alone, as desired.
Have I missed a config setting for this behaviour, or is this feature not yet implemented?
Contributor guide
Assessment
This issue has not been assessed yet.