google / google/yapf

Is it possible to control whether the first function argument starts on the same line of the function?

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

Description

I typically do something like this for long method calls:

```py
i_take_a_lot_of_params(param1=very_long_expression1(),
param2=very_long_expression2(),
param3=very_long_expression3(),
param4=very_long_expression4(),
...)
```

But yapf formats it to this:

```py
i_take_a_lot_of_params(
param1=very_long_expression1(),
param2=very_long_expression2(),
param3=very_long_expression3(),
param4=very_long_expression4(),
...)
```

Is there a knob to disable this behavior?

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.