Inconsistent line break after dictionary key
- Dominant language
- Python
- Stars
- 14k
- Forks
- 904
- PR merge metrics
- No merged PRs in 30d
Description
yapf 0.32.0
```python
# formatted with yapf --no-local-style
def func(x):
return x
matrix = {
'ident': func([
[1, 0, 0],
[0, 1, 0],
[0, 0, 1],
]),
'zero': func([
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
]),
}
matrix_with_half = {
'ident':
func([
[1, 0, 0],
[0, 1, 0],
[0, 0, 1],
]),
'zero':
func([
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
]),
'half':
func([
[1 / 2, 1 / 2, 1 / 2],
[1 / 2, 1 / 2, 1 / 2],
[1 / 2, 1 / 2, 1 / 2],
]),
}
matrix_with_half_and_single_zero = {
'ident':
func([
[1, 0, 0],
[0, 1, 0],
[0, 0, 1],
]),
'zero':
func([
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
]),
'half':
func([
[1 / 2, 1 / 2, 1 / 2],
[1 / 2, 0, 1 / 2],
[1 / 2, 1 / 2, 1 / 2],
]),
}
matrix_with_half_and_single_zero_but_with_short_name = {
'ident': func([
[1, 0, 0],
[0, 1, 0],
[0, 0, 1],
]),
'zero': func([
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
]),
'h': func([
[1 / 2, 1 / 2, 1 / 2],
[1 / 2, 0, 1 / 2],
[1 / 2, 1 / 2, 1 / 2],
]),
}
```
Contributor guide
Assessment
This issue has not been assessed yet.