google / yapf

A formatter for Python files
Apache License 2.0
13.76k stars 891 forks source link

The vim plugin cannot modify python comment format #512

Open CoinCheung opened 6 years ago

CoinCheung commented 6 years ago

I have comment like this:

#the class of Game Field, draw the game field,
#operation of moving(upward, downward, left, right) or merge, add new number for each step
#evaluate the situation (if the player win or lose)

With autopep8, spaces should be added after the comment sign '#', and the second comment line is so long that it should be wrapped. However, with yapf, I see no changes to the comment lines. Do you have similar features about this?

bwendling commented 6 years ago

YAPF doesn't change comments or the contents of any token really. Something like reformatting comments is tricky to get correct in all situations. This isn't a feature I want in the main source code, but if someone wanted to write a contribution, then I would consider it.

slel commented 5 years ago

See #139.