From c806c5c0eb77f38bcda01d326ab89fec304bb937 Mon Sep 17 00:00:00 2001 From: YuKirasawa Date: Sat, 17 Aug 2024 16:14:53 +0800 Subject: [PATCH] fix 2-space rule when SPACES_BEFORE_COMMENT is a list --- yapf/yapflib/reformatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yapf/yapflib/reformatter.py b/yapf/yapflib/reformatter.py index ff0952543..0089c054d 100644 --- a/yapf/yapflib/reformatter.py +++ b/yapf/yapflib/reformatter.py @@ -340,7 +340,7 @@ def _AlignTrailingComments(final_lines): break if aligned_col is None: - aligned_col = max_line_length + aligned_col = max_line_length + 1 # Update the comment token values based on the aligned values for all_pc_line_lengths_index, pc_line_lengths in enumerate(