Comments are not reformatted
- Dominant language
- Python
- Stars
- 14k
- Forks
- 904
- PR merge metrics
- No merged PRs in 30d
Description
yapf reformats the code but not comments, either inline or class docstrings. I didn't see any similar bugs, at least not in the last couple of years.
```
sls@dev 16:26> yapf --version
yapf 0.28.0
sls@dev 16:26> cat example.py
class ExampleClass(object):
"""An instance of this class gets passed around to others and is used as a ...way... to load up common things like
Logging, XXXClient, YYYYClient, etc. I guess. Should probably be changed to an inheritence model."""
def __init__(self, param1, param2, param3, param4, param5, param6, param7, param8):
# Here is a really long comment on a single line that that should be reformatted to two lines, but yapf doesn't reformat.
self.something = this_is_a_very_long_line(param1, param2, param3, param4, param5, param6, param7, param8)
sls@dev 16:26> yapf --style=pep8 example.py
class ExampleClass(object):
"""An instance of this class gets passed around to others and is used as a ...way... to load up common things like
Logging, XXXClient, YYYYClient, etc. I guess. Should probably be changed to an inheritence model."""
def __init__(self, param1, param2, param3, param4, param5, param6, param7,
param8):
# Here is a really long comment on a single line that that should be reformatted to two lines, but yapf doesn't reformat.
self.something = this_is_a_very_long_line(param1, param2, param3,
param4, param5, param6,
param7, param8)
sls@dev 16:26>
```
Contributor guide
Assessment
This issue has not been assessed yet.