google / google/yapf

yapf 0.24.0 breaks formatting of nested data structures.

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

Description

The code in question is:
```python
CHARGE_SCHEMA = {
"name":
"Charge",
"type":
"record",
"fields": [{
"name": "Name",
"type": "string"
}, {
"name": "Aggregators",
"type": ["null", {
"type": "array",
"items": "string"
}],
"default": None
}, {
"name": "IDTypeArray",
"type": {
"type": "array",
"items": "string"
}
}]
}
```
In v0.24.0 this becomes:
```python
CHARGE_SCHEMA = {
"name":
"Charge",
"type":
"record",
"fields": [{
"name": "Name",
"type": "string"
},
{
"name": "Aggregators",
"type": ["null", {
"type": "array",
"items": "string"
}],
"default": None
}, {
"name": "IDTypeArray",
"type": {
"type": "array",
"items": "string"
}
}]
}
```

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.