google / google/yapf

Do not split function parameters.

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

Description

We often have functions of long parameters that are grouped for better presentation.
Is there a knob to prevent `yapf` from splitting/rearrange on function's parameters while still processing other rules such as removing extra spaces. Example desired output would be:

```python
# grouped parameters
complex_calculation(
alpha=1, beta=2, gamma=3, # parameter group 1
environment_alpha=1, environment_beta=2, # parameter group 2
temperature=3, k1=1, k2=2, # parameter group 3
)
```

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.