yapf icon indicating copy to clipboard operation
yapf copied to clipboard

spaces_before_comment = list examples on README are confusing

Open lizawang opened this issue 3 years ago • 0 comments

Hello,

when spaces_before_comment = 15, 20,

Actual run: In the first block, they are aligned to col 15 with 14 columns before comments, and in the second block they are aligned to col 20 with 19 columns before comments.

    1 + 1         # Adding values <-- end of line comments in block aligned to col 15
    two + two     # More adding

    longer_statement   # This is a longer statement <-- end of line comments in block aligned to col 20
    short              # This is a shorter statement

README example: In the first block, it says aligned to col 15, but actually to col 16 with 15 columns before comments. Same description and example mismatch with col 20 example.

    1 + 1          # Adding values <-- end of line comments in block aligned to col 15
    two + two      # More adding

    longer_statement    # This is a longer statement <-- end of line comments in block aligned to col 20
    short               # This is a shorter statement

lizawang avatar Sep 13 '22 15:09 lizawang