google / google/yapf

set custom `SPLIT_ALL_COMMA_SEPARATED_VALUES`

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

Description

Hi, I like `SPLIT_ALL_COMMA_SEPARATED_VALUES` but I don't want my function def arguments (only in the definition of a function) to be separated into each line, (list, dict, tuple) are fine to split.

Example:
```python

def some_function(para1, para2, para3, para4, para5):
pass
```

This will be formatted to
```python

def some_function(para1,
para2,
para3,
para4,
para5):
pass
```

but I would prefer formatted to
```python

def some_function(para1, para2, para3, para4,
para5):
pass
```

While for calling the function, I am fine with split into separated lines, such as
```python

some_function(para1,
para2,
para3,
para4,
para5)
```

How could I achieve this? Thanks in advance!

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.