google / google/yapf

Unable to break before all logical operators

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

Description

My apologies of this is a duplicate (I could not find anything similar).

I'm looking for something like the trailing comma behavior, where logical conditions in an expression are all on a separate line.

```
(
aaaaaaaaaaaaaaaaaaa()
or bbbbbbbbbbbbbbbbbb()
or cccccccccccccccccc()
or dddddddddddddddddd()
)
```

yapf wants to avoid wrapping to fill available columns. E.g.

```
(
aaaaaaaaaaaaaaaaaaa() or bbbbbbbbbbbbbbbbbb() or cccccccccccccccccc()
or dddddddddddddddddd()
)
```

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.