SPLIT_BEFORE_FIRST_ARGUMENT should be respected when SPLIT_COMPLEX_COMPREHENSION causes the split.
- Dominant language
- Python
- Stars
- 14k
- Forks
- 904
- PR merge metrics
- No merged PRs in 30d
Description
Given this .style.yapf
```
[style]
based_on_style = google
split_before_first_argument = True
split_arguments_when_comma_terminated = True
coalesce_brackets = True
```
currently yapf formats this code like this:
```python
total_food_per_elf = [
sum(int(food)
for food in foods.split('\n'))
for foods in input_text.split('\n\n')
]
```
But according to the description of the SPLIT_BEFORE_FIRST_ARGUMENT, "If an argument / parameter list is going to be split, then split before the first argument.", the result should be
```python
total_food_per_elf = [
sum(
int(food)
for food in foods.split('\n')
)
for foods in input_text.split('\n\n')
]
```
Contributor guide
Assessment
This issue has not been assessed yet.