Dictionary comments are oddly and inconsistently indented with SPLIT_ALL_TOP_LEVEL_COMMA_SEPARATED_VALUES
- Dominant language
- Python
- Stars
- 14k
- Forks
- 904
- PR merge metrics
- No merged PRs in 30d
Description
Reproducible example:
```python
table = {
# Description #1
"foo": "lorem ipsum dolor est",
# Description #2
"bar": "lorem ipsum dolor est",
# Description #2
"baz": "lorem ipsum dolor est",
}
```
with a `.style.yapf` file:
```
[style]
SPLIT_ALL_TOP_LEVEL_COMMA_SEPARATED_VALUES = True
```
running `yapf --diff` (0.31.0) outputs:
```
@@ -2,9 +2,9 @@
# Description #1
"foo": "lorem ipsum dolor est",
- # Description #2
+ # Description #2
"bar": "lorem ipsum dolor est",
- # Description #2
+ # Description #2
"baz": "lorem ipsum dolor est",
}
```
The first comment was left alone, but the subsequent comments were inexplicably(?) unindented by two spaces.
Contributor guide
Assessment
This issue has not been assessed yet.