File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -122,9 +122,16 @@ def strings_with_wrong_placed_space(
122122 first_string = first_token [1 ][1 :- 1 ]
123123 second_string = third_token [1 ][1 :- 1 ]
124124
125- if ((not first_string .endswith (" " )) and second_string .startswith (" " )) and (
126- not second_string .startswith (" " )
127- ):
125+ is_first_ends_single : bool = first_string .endswith (" " )
126+ is_first_ends_newline : bool = first_string .endswith ("\n " )
127+ is_second_starts_single : bool = second_string .startswith (" " )
128+ is_second_starts_double : bool = second_string .startswith (" " )
129+
130+ if (
131+ (not is_first_ends_single )
132+ and is_second_starts_single
133+ and (not is_second_starts_double )
134+ ) and (not is_first_ends_newline ):
128135 yield (
129136 source_path ,
130137 third_token [2 ][0 ],
You can’t perform that action at this time.
0 commit comments