google / google/yapf

Knob to modify dict alignment

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

Description

PyCharm support the following formatting configuration for dicts:

Original:
```
{"green": 42, "eggs and ham": -0.0e0}
```

Dict alignment: align on value
```
{
"green": 42,
"eggs and ham": -0.0e0,
}
```

Dict alignment: align on colon
```
{
"green" : 42,
"eggs and ham": -0.0e0,
}
```

A knob to modify this setting in yapf would be great, and would prevent the yapf / PyCharm style formatting loop I've found myself in.

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.