google / google/yapf

prefer splitting function args to splitting on indexing

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

Description

I ran across this example that I think behaves poorly. Take some nicely formatted case:

``` python
dictionary_with_really_really_long_name_or_something[index].update(
other_dict['other_value']
)
```

it will format to

``` python
dictionary_with_really_really_long_name_or_something[index].update(other_dict[
'other_value'])
```

I think splitting on function args "(" is easier to read than splitting on indexing "[".

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.