Unstable output with broken comment indentation
- Dominant language
- Python
- Stars
- 14k
- Forks
- 904
- PR merge metrics
- No merged PRs in 30d
Description
Another situation where YAPF fails to converge on a stable format in one step:
```python
class foo:
#
# A
#
def a():
pass
#
# B
#
def b():
pass
```
is formatted to
```python
class foo:
#
# A
#
def a():
pass
#
# B
#
def b():
pass
```
and then to
```python
class foo:
#
# A
#
def a():
pass
#
# B
#
def b():
pass
```
(note the extra blank line)
I would have thought these sort of unstable outputs would be really easy to check for using fuzzers / property based testing, since the property is so simple: `format(format(a)) == format(a)`. It looks like Python has a property based testing library: https://hypothesis.readthedocs.io/en/latest/
Contributor guide
Assessment
This issue has not been assessed yet.