Dictionary key/values being seperated onto new lines in complex dictionary?
- Dominant language
- Python
- Stars
- 14k
- Forks
- 904
- PR merge metrics
- No merged PRs in 30d
Description
I am using:
```
yapf 0.28.0
```
I have a dictionary that looks like this
```
query = {
'start': '1m-ago',
'queries': [
{
'metric': 'value.%d' % variable_id,
'aggregator': 'sum',
'downsample': '1d-avg',
'filters': [
{
'tagk': 'valid_id',
'filter': valid_id,
'type': 'literal_or',
'groupBy': False,
},
],
'rate': True,
'rateOptions': {
'counter': 'true',
'resetValue': 1000000000000
}
},
]
}
```
When I run yapf, I get a reformated dictionary that looks like this:
```
query = {
'start':
'1m-ago',
'queries': [
{
'metric':
'value.%d' % variable_id,
'aggregator':
'sum',
'downsample':
'1d-avg',
'filters': [
{
'tagk': 'valid_id',
'filter': valid_id,
'type': 'literal_or',
'groupBy': False,
},
],
'rate':
True,
'rateOptions': {
'counter': 'true',
'resetValue': 1000000000000
}
},
]
}
```
---
Why are some of my key/values being separated into two lines? Not all of them are separated and the ones that are, are some of the shorter lines.
Contributor guide
Assessment
This issue has not been assessed yet.