google / google/yapf

Split arguments into separate lines if they're multiline

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

Description

I've some function calls where arguments don't fit a single line:

```python
some_function(some_value, some_value, some_value, some_value, some_value,
some_value)
```

For cases such as these, I'd prefer to always split each argument into a separate line (I feel that this is extremely common):

```python
some_function(
some_value,
some_value,
some_value,
some_value,
some_value,
some_value)
```

This is currently not possible. The closest thing is `SPLIT_ARGUMENTS_WHEN_COMMA_TERMINATED`, but that only applies if there's a trailing comma. In my case, I don't want to depend on the comma, but rather of whether the arguments fit in a single line or not.

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.